Home ABAP Tutorials ABAP Objects Advantages of OO ABAP
Advantages of OO ABAP PDF Print E-mail
User Rating: / 2
PoorBest 
ABAP Tutorials - Object Oriented ABAP
Written by admin   
Tuesday, 09 September 2008 16:49

Following are some main advantages of using ABAP Objects over conventional ABAP Procedural programming.Advantages1Advantages2

  • ABAP Objects establishes an advanced level of data encapsulation that improves the maintainability and stability of your programs. In procedural programming, a program’s global data area can encompasses a large number of disparate data objects that end up mixed together in a single memory area, where one function might change the application state in a way other functions do not expect. But in OO programming the state is kept in ‘objects’ that separate externally and internally visible data and implementations, ensuring that functions (methods in OO context) work only with the data they should, attributes defining an object’s state remain intact, and applications using that object continue to work correctly.
  • ABAP Objects provides you with the ability to instantiate multiple instances of a single class each with its own variation of characteristics defined in the class, and to use an object’s own functions (methods) to change its state. Together with the ABAP Objects automatic garbage collector, this means that developers do not have to deal with manually associating data and functionality for each and every object, or explicitly controlling the lifetime of objects. But in Procedural programming, which does not support multiple instantiation, data and functions are separate. You work with stateless functions that have to be initialized via their parameter interface with every call, and then manually cleared from memory.
  • ABAP Objects greatly enhances code reuse through “inheritance” which is a key property of the OO programming paradigm. With “inheritance”  you can derive some or all of the characteristics from a general procedure (method in OO context) into various specialized procedures simply by programming the difference between two, which results in smaller procedures, and in turn improves maintainability. But in Procedural programming, you must call existing procedures ( subroutines or function modules) as they are or implement entirely new ones.
  • ABAP Objects enables you to work with an object’s business logic through a standalone interface, rather than working with it directly, which relieves you from having to know exactly how a certain functionality is implemented. It also enables you to later alter an implementation with out modifying the coding that uses the interface, so that modifications of standard code become less problematic. But Procedural programming does not support the concept of standalone interfaces as a point of contact to an object- the interface concept is basically restricted to parameter interfaces of procedures ( subroutines or function modules )
  • ABAP Objects makes it easy to incorporate event-driven programming models. Applications can be loosely coupled through a ‘publish and subscribe’ model, where a caller (the event) is not statically bound to the called procedure (the event handler). This provides greater flexibility than the procedural approach, where the coupling is much tighter and the flow of program control is more predetermined.
  • ABAP Objects is more explicit, and therefore simpler to use.
  • ABAP Objects offers cleaner syntax and semantic rules. Example obsolete and error-prone language concepts are explicitly forbidden inside ABAP Objects classes. In contrast , you can still use them in Procedural ABAP. In which case the syntax check presents you with a warning in some critical cases, nothing more.
  • ABAP Objects is the only way you can use new ABAP technology. For example all new GUI concepts, such as the SAP Control Framework (CFW) and Business Server Pages (BSP), are encapsulated in ABAP Objects classes. With procedural ABAP, you are stuck with classical screen and list processing.
Comments
Add New Search
Write comment
Name:
Email:
 
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
 
Please input the anti-spam code that you can read in the image.

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated ( Tuesday, 09 September 2008 17:18 )
 

Advertisement

 

Google Search

Advertisement