Eight reasons for BaP Oo (2)
1. ABAP Oo is clearer and easier to use. For example, if you are using ABAP Oo Program The execution process is no longer implicitly controlled by the runtime. In this way, you can design the processes executed by the Program on your own without having to understand and manipulate external control mechanisms (that is, reports and dialog screen events) as the process is oriented ).
2. abap oo has clearer syntax and semantic rules. For example, some outdated statements that are prone to errors cannot be used again in the ABAP oo class. These syntaxes are still supported in process-oriented programs. At most, a warning is reported to you at critical times.
3. Some new technologies of ABAP can only be implemented through ABAP oo. For example, all new GUI concepts, such as SAP control framework and BSP, can be implemented only in the ABAP oo mode. For process-oriented ABAP, you can only use the traditional screen and list processing.
So even if you are not ready to completely transform to OO in future development, you can use the OO technology to reduce the hidden risks of errors and enhance Code Maintainability. The following sections describe how to achieve this goal.
So is process-oriented ABAP and ABAP oo superior? The following sections will be discussed one by one. First, let's take a look at the history of ABAP oo.
1. SAP basis release 4.5 released a version of ABAP Oo, introduced the concept of class interfaces, and can create objects (instantiate classes) through classes ).
2. SAP basis release 4.6 released the full version of ABAP Oo, introducing an important concept inheritance (inheritance) of the OO method. Multiple Interfaces can be used to create a composite interface.
3. The next-generation version of SAP Web Application Server 6.10/6.20 sap basis introduces the concept of friendship between classes. The object service can store objects in the database.
4. SAP Web Application Server 6.40 introduces the concept of shared objects, which allows objects to be stored in the shared memory of the application server. In this way, any program on this server can access it.
Key Points
N abap Oo is ABAP Programming Language Extension
N abap Oo is backward compatible
N sap released abap oo to further enhance code reusability
N with the release of ABAP Oo, ABAP supports process-oriented and object-oriented modes during operation.