Okapi

The Okapi project is a set of tools that aims in helping with a Model Driven Engineering (MDE) approach for Progress OpenEdge development. There are two separate components available as Eclipse plugins, one addressing the Model Driven Architecture (MDA) approach – also known as “forward engineering” or “model to text” transformation, and one for the Architecture-Driven Modernization (ADM) – which relates more to application modernization and transformation but it’s also sometimes referred to as “reverse engineering”.

Aiming for a pragmatic MDE approach, OKAPI project is based on Eclipse Modeling Framework components and use already established standards like UML2 and XMI – XML Metadata Interchange which is the default UML2 model serialization format and is supported by most of the UML Modeling tools on the market.

DOCUMENTATION

The project is documented using the integrated Eclipse help system and help is accessible either through the context-help within the wizards

Context Help

or directly by selecting the ‘Okapi MDA’ section in Eclipse Help menu.

Help

For convenience the static help files for Okapi as exported from Eclipse Help system can be found here.

FORWARD ENGINEERING

The Forward Engineering component is a code generator module based on Acceleo Model to Text Transformation – which is part of Eclipse Modeling project – and can be applied to standard UML2 models to generate OpenEdge ABL code. Current implementation offers support for OpenEdge Object Oriented constructs for the following elements:

  • Interface
    • public properties
    • public methods
  • Class
    • inheritance (generalization)
    • interfaces realization
    • all properties
    • all methods
    • constructors (methods with the same name as the class)
    • interface implementation (all methods from implemented interfaces)
    • internal temp-tables, datasets (nested components)
    • referenced (dependency) temp-tables, datasets (includes if not nested, in-line definition for nested components)
    • protected user code sections for methods and class main block (don’t get overwritten on re-generation)
  • Temp-Table – class that inherits “Temp-Table” primitive type (generalization)
    • generate as include file if not nested component (internal class)
    • all properties as fields
    • all methods as indexes
  • Dataset – class that inherits “Dataset” primitive type (generalization)
    • generate as include file if not nested component (internal class)
    • all internal temp-tables (nested components)
    • all referenced (dependency) temp-tables (includes if not nested, in-line definition for nested components)
    • protected user code section for data-relations definition
REVERSE ENGINEERING

The Reverse Engineering module of Okapi aims in helping mainly with extracting the application model from the source code for cases where the application lacks technical documentation, especially in the area of application modernization and transformation. Please note that Okapi ABL code parser use an ‘incomplete’ grammar by only considering elements that represent the application API – mainly external procedures, internal entries for procedural code and classes and interfaces for object oriented code; data structures like temp-table and dataset definitions are also extracted. Current implementation offers support for both object oriented and procedural syntax constructs for the following elements:

  • Interface
    • Method mapped to UML Operation
    • Properties and Variables mapped to UML Attributes
  • Class
    • Method mapped to UML Operation
    • Properties and Variables mapped to UML Attributes
    • Inheritance mapped to UML Generalization
    • Interface implementation mapped to UML Realization
  • External Procedure
    • Main block mapped to UML Operation having the same name as the procedure itself
    • Variables defined at procedure level mapped to UML Attributes
  • Structured Procedure
    • Internal entries (functions, procedures) mapped to UML Operation
    • Variables defined at procedure level mapped to UML Attributes
  • Temp-Table
    • loaded as a “inner” class of the object in which it was defined
    • the class “inherits” the “TEMP-TABLE” primitive type
    • fields are represented as attributes
    • indexes are represented as operations
  • Dataset
    • loaded as a “inner” class of the object in which it was defined
    • the class “inherits” the “DATASET” primitive type
    • dependency links are created between the dataset and all temp-table objects part of the dataset

The following reverse engineering rules and conventions applies:

  • primitive and object data types for attributes and operation’s parameters
  • default (initial) value for attributes and operation’s parameters
  • comments for classes, interfaces, operations and attributes (the comment block right before the element definition is considered)
  • included files translates to dependency links
DOWNLOAD

To install the plugin, point your Install Manager at this site.

  • Help > Software Updates… > Available Software > Add Site…
    • Location: http://www.ganimede.ro/mda/okapi/update

The forward engineering plugin is built using Acceleo which is part of Eclipse Modeling M2T project that can be downloaded from Eclipse project site. A sample UML2 model along with the generated code can be found here, the famous Sports database definition loaded in UML model with OpenEdge profile can also be downloaded – as graphical UML editor we used Papyrus.

LICENSE

The project is licensed using a dual model:

  • community license for non commercial use
  • commercial license

If interested in using it commercially the licensing model we propose is either one-time pay licensed per developer or per site, or yearly based subscription.

Comments are closed.