Skip to main content

How it works

Definitions

First, let's give a definition to some of the terms that will be used in this chapter:

TermDefinition
ExpansionExpansion is the process of generating code based on a Model.
ModelAn abstract description of an Application. The developer describes their desired Application in a collection of Model Files.
ArtifactIn the context of Expansion, an Artifact always refers to a file generated by Expanders.
ExpanderAn Expander is a combination of mapping logic and a template that, when given an Element, generates a single Artifact.
ElementAn Element is a small part of the Model. Artifacts are generated by iterating over each Element in the Model and applying all applicable Expanders.
FeatureIn the context of Expansion, a Feature is something that requires a condition to activate, and adds code to several Expanders to implement cross-cutting logic.
CompositeAfter the model is read, it is transformed and linked to form Composites. These

From Model to Expanding Artifacts

The process of expanding from a model can be described into 4 steps.

  • The first 3 steps are implemented with the ModelLoader. This class is provided by prime-core.
  • The last step are implemented by the ExpansionRunners. These classes are provided by expanders-core.