Skip to main content

Programs & Modules

In a metamodel, there are two special roles to be given to elementClasses that help determine to overall architecture of the metamodels.

  • Program: the root of the systemSystemA set of interconnected components that work together to achieve a specific purpose or function. for a standalone metamodel.
  • Module: the root of reusable metamodel blocks.

Program​

Each standalone metamodel has a root element. This element is referred to as the Program. A Program has:

  • ElementClass in the metamodel with role program.
  • ProgramType: a description of what kind of program we wish to expand from the model. This way, the same functional metamodel can have different structural interpretations.

An example from the elements metamodel and the JEE ApplicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution. Stack:

  • Application is an ElementClass with role program, described in the elements ontology.
  • Related to this program, there is a JeeApplication ProgramType. This describes how to load the ApplicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution. model, where to expand and which layersLayerLogical separation of functionality within a single system/application, focused on code organization. are used. It provides a constructive perspective, defining technological aspects, to the functional modelFunctional ModelAn M1 model or instantiation of an ontology from the root element (e.g., 'E-Crystal')..
ProgramTypes and technologies

One program ElementClass can have multiple ProgramTypes. The concept of ProgramTypes related to a program, corresponds with the multiple ways how that model can be expanded into code. E.g. an ApplicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution. model can be used to generate a JEE applicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution.. But, the same model can also be used to generate a Spring applicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution. or any other technology.


Module​

Some scenarios ask for the need to build model blocks that are reusable over different metamodels, ontologies, and multiple programs. The elements encasing the common parts are referred to as Modules.

  • Modules can encapsulate a concern, which can then be reused in multiple Programs of the same type. E.g. the account base-component is a module that provides authentication and authorization.
  • Modules can define a common model shared among multiple different Programs which are part of a larger systemSystemA set of interconnected components that work together to achieve a specific purpose or function.. E.g. the Module describes a message interface. This can then be used in the consumer Program to generate message processors, and the producer Program to generate clients.

A Module has:

  • ElementClass in the metamodel with role module.
  • ModuleType: a description of how the module works within a specific ProgramType. This way, the same functional reusable module can have different structural interpretations when integrated into a specific ProgramType.

An example from the elements metamodel and the JEE ApplicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution. Stack:

  • Component is an ElementClass with role module, described in the elements ontology.
  • Related to this module, there is a JeeComponent ModuleType, linked to the ProgramType JeeApplication. The moduleType describes how to load modules, where to expand, and which layersLayerLogical separation of functionality within a single system/application, focused on code organization. to include. It provides a constructive perspective, defining technological aspects, to the functional modelFunctional ModelAn M1 model or instantiation of an ontology from the root element (e.g., 'E-Crystal')..

When defining a Module within a Program, you will need to define an aggregation reference from Module to Program.


Reference Guides

More extensive documentation on Programs & Modules can be found here: