Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming

> ## Comparing programming models

> In general, the run-time nature of procedure-based programming can support a more dynamic coding model than you might write in order to accomplish the same task using class-based programming. Class-based programming, on the other hand, can support a simplified program structure that is much easier to maintain and that helps to identify and more easily reuse code from one object to another. However, because you can almost freely mix class-based and procedure-based objects in the same application, you can choose the implementation model that best meets your requirements for any given programming task.

> Many successful applications have been built and will continue to be built and extended with procedures, using persistent procedures and the super procedure mechanism to create a run-time inheritance chain. Generally, Progress Software Corporation (PSC) recommends that you consider using classes for new development, now that they are available. They provide much greater assurance that Progress code that compiles will also execute successfully, whereas many code paths that lead through a set of related procedure instances can be verified only by executing them at run time.

> There are certainly circumstances, however, where the use of procedures might well be preferred. Precisely because procedures give you the flexibility to assemble a procedure hierarchy at run time, super procedures allow you to combine procedures in a way that is data-driven or determined by application logic at run time. Likewise, the dynamic `RUN` `VALUE(``procedure-variable``)` statement and the `DYNAMIC-FUNCTION` built-in function let your application invoke procedures and functions whose names are determined at run time, which can also support data-driven operations.

> Throughout this manual, there are frequent comparisons between class-based programming and procedure-based programming. To simplify the documentation, the term class-based refers to objects and programming that is based on Progress classes, and the term procedure-based refers to objects and programming that is based on Progress procedures. Also, in sections of the manual on class-based features, where a specific class-based programming feature is compared with a similar feature using procedure-based programming, the documentation appears in a separate subsection entitled, “Comparison with procedure-based programming.”

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095