Try OpenEdge Now
skip to main content
Object-oriented Programming
Object-oriented Programming and ABL : Overview of object-oriented programming
 

Overview of object-oriented programming

To understand the object-oriented features of ABL and how best to use them, it is helpful to understand the key concepts of object-oriented programming. This section is a brief introduction to object-oriented programming. It also compares these concepts with features of procedural programming used to accomplish the same goals, using ABL.
Object-oriented programming is a programming model organized around objects rather than actions. Conventional procedural programming normally takes input data, processes it, and produces output data. The primary programming challenge is how to write the logic. Object-oriented programming focuses on the objects that you want to manipulate, their relationships, and the logic required to manipulate them.
The fundamental advantage of object-oriented programming is that the data and the operations that manipulate the data are both encapsulated in the object with a well-defined interface. Objects are the building blocks of an object-oriented program. An application that uses object-oriented technology is basically a collection of objects that interact through their interfaces.
The concepts of a type, class, interface, and object are closely related but it is important to understand the difference between these four terms. A type is a name that identifies specific members of a class, which can include methods, properties, data members, and events. A class defines the implementation of a type and its class members. An abstract class is essentially a type with an incomplete implementation. An interface (described previously) also defines a type that identifies certain class members (properties, methods, or events) that a class must implement. An object is an instance of a class whose type can be represented as any class or interface that contributes members defined in the object’s class hierarchy. Objects have a life cycle in which they can be repeatedly created, used, and destroyed during an ABL session.
Classes in ABL provide support for a basic set of object-oriented concepts. To illustrate these key concepts, this manual includes figures that contain a simple and informal pseudo-code. To simplify this pseudo-code, the data types of data elements and method parameters, other than specific references to classes and interfaces, are implied from context. For example, the name of a data element can serve to denote its type.
The following sections describe these basic object-oriented concepts:
*Encapsulation
*Inheritance
*Delegation
*Polymorphism
*Method overloading
*Strong typing
*Glossary of terms
* Encapsulation
* Inheritance
* Delegation
* Polymorphism
* Method overloading
* Strong typing
* Glossary of terms