Eclipse Modeling Framework

from Wikipedia, the free encyclopedia

The Eclipse Modeling Framework ( EMF ) is an open source Java - Framework for modeling . Among other things, it enables the automated generation of source code from models. EMF is a project of the Eclipse open source community.

method

At the center of software development with EMF is a domain model that describes a problem area to be mapped in the form of a class diagram . This domain model is called the Ecore model in EMF. EMF offers two editors with which Ecore models can be created and edited: a diagrammatic and a tree-based editor. It is also possible to automatically convert other, class diagram-like formats into Ecore models. Supported input formats are XSD schemes (such as JAXB ), annotated Java interfaces and UML diagrams ( Rose , TOPCASED , MagicDraw and Omondo ).

For a given Ecore model, EMF generates an editor with which instances of this model can be created, queried, manipulated, serialized in XMI format , validated and monitored for changes in the style of the MVC design pattern. In addition, JUnit code is generated that tests the generated code.

The generation process as well as the generated code can be adapted. In particular, bodies of modeled method signatures must be implemented by the developers. Implemented functionality and newly generated code are automatically merged. For more extensive requirements, EMF offers the option of creating models dynamically at runtime (e.g. when the model is only known). Using plugins it is possible to generate complete data-oriented RCP applications and to persist model instances in any database.

Components

  • The Ecore metamodel is the description approach for Ecore models. It contains basic concepts of object-oriented modeling such as packages , classes , references and attributes . Ecore is based on a subset of the MOF standard for metamodeling (Meta Object Facility). In the course of its widespread use, EMF exerted influence on the development of the EMOF standard (Essential MOF), which is largely analogous to Ecore.
  • EMF uses JET (Java Emitter Templates) for code generation . JET is a template-based language in the form of JavaServer Pages . The artifacts to be generated are described here using templates - “file templates” with fixed, constant proportions and “gaps” that are filled dynamically.
  • After repeated code generation, for example due to model expansions, JMerge is responsible for incorporating adjustments that have already been made into the latest version of the generated code.
  • The SDO reference implementation from IBM uses EMF and is part of the EMF installation.

advantages

One of the biggest advantages is the integration with the Eclipse tool platform. This enables the generation of UI components and the collaboration with other Eclipse projects, for example in the Eclipse Graphical Modeling Framework ( GMF ). Serialization and validation increase development productivity. In addition, the training period is short due to the many modeling options ( XSD , UML , Java interfaces). The use of code generators and MDD (Model Driven Development) also increases productivity, reduces repetitions and thus possible sources of error.

Open source frameworks around EMF

Web links

Commons : Eclipse Modeling Framework  - collection of images, videos and audio files

Individual evidence

  1. EMFStore on eclipse.org