openArchitectureWare (oAW) is the name of a generator framework for supporting Model Driven Software Development (MDSD). Model Driven Architecture (MDA) is a standard of the Object Management Group (OMG) for model-based software development. In this context, oAW implements both the testing of models and their transformation as well as the generation of program code. The framework itself is implemented in Java and bundles various tools.
OaW supports the processing of different models, such as Eclipse Modelling Framework (EMF), XMI dialects of different UML tools, the Eclipse UML2- XMI format and XML. For each of these formats a so-called adapter is available, which realizes the mapping of the format to internal model instances. This allows the framework to react flexibly to extensions by generating corresponding adapters for new formats. For the instantiation of the models, oAW uses the Ecore metamodel of the Eclipse Modeling Framework (EMF), which is an open source framework that specifically supports the generation of Java program code from models. The generator framework with its components Workflow Engine, Xpand, Xtend, Check and Xtext is part of the Eclipse Modeling Project and is available as open source under the link below. The framework enables the reuse of already existing Eclipse projects and integrates itself into the Eclipse development environment without any transition. Its use is particularly advantageous in larger and more complex projects. As an active project of the Eclipse Foundation, oAW is subject to stable, further development.
openArchitectureWare with Java FrameworkopenArchitectureWare (oAW) is a framework implemented on the basis of Java that supports arbitrary transformations of models. Thus, in addition to model-to-model transformations, model-to-code transformations are also possible, so that oAW is not limited to the generation of program code. Furthermore, functions for validating models, testing and debugging are provided. language Xtend and the language Check are all based on the same type and expression system. The oAW languages are all supported by convenient Eclipse editors, which greatly simplify the work.
A brief description of each component follows:
Workflow engine realizes a generator for arbitrary model transformations for example for Java code generation. The workflow engine is composed of so-called cartridges. A workflow is a list of components based on XML syntax. The components (Workflow Components) are executed one after the other and communicate with each other via so-called slots.
Xtext A framework that generates the appropriate parser, the meta-model and an editor integrated in Eclipse on the basis of the grammar of a domain-specific language.
Type system A unified type system that supports the interaction of components and metamodels.
Expression system Defines a common base of a combination of Java and Object Cons-traint Language (OCL) for the language constructs of oAW.
Xpand Defines a template language for describing the rules of a model transformation. Among other things, this can be used to describe the rules for generating Java program code from a model structure.
Xtend Functional language for extending metamodel types.
Check Describes the constraints of the metamodels in an OCL-like language.
Central control of code generation is provided by the workflow engine. A simple example of the workflow file execution flow might look like the following:
- The destination folder for the program code to be generated is stored in a variable.
- To load a model, component X is called. The model is stored in the output slot so that it is available for the other components.
- To check the model for correctness, component Y is called. If an error occurs, the workflow is terminated and this is noted in a log.
- The component Xpand-Generator is initiated, the Java program code is generated and stored in the target folder. In addition, a JavaBeautifier ensures an impeccable appearance of the generated code.
The fact that oAW has meanwhile become a mature modeling framework can certainly be seen from its inclusion in the Eclipse Modeling Project. As far as domain-specific problems are concerned, the use of Xtext also makes sense for reasons of flexibility and portability. However, since the development of a new Domain Specific Language (DSL) is time-consuming, Xtext should only be used to simplify development in the long term or if no corresponding modeling tools exist yet.