Try OpenEdge Now
skip to main content
Object-oriented Programming
Object-oriented Programming and ABL : Support for classes in ABL
 

Support for classes in ABL

The goal of object-oriented programming support in ABL is to extend the language to provide a cohesive and standard object-oriented programming model within ABL while continuing to fully support the programming model available in previous releases of OpenEdge. To this end, ABL provides support for programming with classes in addition to, and together with, its support for programming with procedures. This object-oriented language support is a natural basis for writing applications that conform to the OpenEdge Reference Architecture (OERA) introduced with OpenEdge Release 10. For more information on the OERA, see the documentation and samples on Progress Communities: https://community.progress.com/technicalusers/w/openedgecloudarcade/tags/oera/default.aspx.
A class, like a procedure, contains or references data (state) and behavior that operates on that data. Thus, a common element between ABL procedures and classes is the ability to define objects. An object is a self-contained unit of code that encapsulates an instance of well-defined state and behavior.
In releases of OpenEdge prior to Release 10.1A, ABL persistent procedures allow you to create and manage objects in which most of the relationships between them are created and managed at run time. ABL classes, on the other hand, contain relationships that you create at compile time, which allows the ABL Virtual Machine (AVM) to automate the management of these relationships at run time. Thus, unlike a persistent procedure, a class defines a well-structured type (or object type) that ABL recognizes at compile time and that you, at run time, can realize as an object that behaves according to the definition of that type.
Classes, by definition, support a variety of object-oriented features that help to organize state and behavior in an application. ABL provides limited support for these object-oriented technologies with persistent procedures. The variables, buffers, temp-tables, and so on, defined in the main block of a persistent procedure, represent the object data, and the internal procedures and user-defined functions represent the object behavior. However some of the other standard object-oriented features are not supported using persistent procedures.
The language enhancements for classes provide a complete set of object-oriented constructs that support all the standard behavior for programming with classes expected within the object-oriented development community. Anyone with an object-oriented programming background will feel comfortable programming with classes in ABL. Anyone who wants to learn about object-oriented programming can pick up any book on object-oriented programming and be able to apply the object-oriented concepts in that book using ABL syntax that supports classes.
* Advantages of classes in ABL
* Foundations of ABL classes