Eclipse Modeling Framework

The Eclipse Modeling Framework (EMF ) is an open source Java framework for modeling. It allows, among other things, the automated generation of code from models. EMF is a project of the Eclipse open source community.

Method

In the center of the software development with EMF is a domain model that describes a problem area to be imaged in the form of a class diagram. This domain model is referred to as EMF Ecore model. EMF provides two editors for creating itself Ecore models and can be edited: a diagrammatic and a tree-based editor. Besides, it is possible to use other, class diagram - like formats in automated Ecore models to convert. Supported input formats are XSD schemas ( such as in JAXB ) annotated Java interfaces and UML diagrams ( Rose, TOPCASED, MagicDraw and Omondo ).

For a given Ecore model EMF generates an editor with which to create instances of this model, query, manipulate, serialize the XMI format, validate, and can be monitored in the style of the MVC design pattern for changes. In addition, JUnit code is generated which tests the generated code.

The generation process and the generated code can be customized. In particular hulls must be implemented by the modeled method signatures by the developers. Implemented functionality and newly generated code will be automatically merged. For further claims about EMF provides the ability to dynamically create models at runtime ( for example, if the model only is known). By the use of plug-ins it is possible to generate full -data-oriented applications to persist RCP model instances in any database.

Components

  • The Ecore metamodel is the description approach for Ecore models. It includes basic concepts of object oriented modeling such as packages, classes, references and attributes. Ecore is based on a subset of the MOF standards for Metamodelierung ( Meta Object Facility ). As part of its far-reaching dissemination EMF exerted influence on the development of EMOF standards (Essential MOF), which is largely analogous to Ecore.
  • During code generation EMF relies on JET (Java Emitter Templates). JET is a template -based language in the style of Java Server Pages. The to be generated artifacts are described here by template - "File Templates" with fixed, constant parts and "gaps" that are filled dynamically.
  • After repeated code generation, eg due to upgrades, JMerge is responsible einzupflegen already made adjustments in the latest version of the generated code.
  • The SDO reference implementation of IBM uses EMF and is part of the EMF installation.

Benefits

One of the biggest advantages is the integration into the Eclipse tool platform. This allows the generation of UI components as well as cooperation with other Eclipse projects, such as the Eclipse Graphical Modeling Framework (GMF ). Serialization and validation increase productivity in development. In addition, the learning curve is low due to the many possibilities of modeling ( XSD, UML, Java interfaces ). The use of code generators and MDD ( Model Driven Development ) also increases productivity, reduces repetitions, as possible sources of error.

Open source frameworks around EMF

  • Acceleo ( A code generator which uses EMF models as input )
  • ATL ( A model transformation language )
  • Connected Data Objects ( CDO), a free implementation of distributed shared model based on EMF
  • EMFStore ( A Model Repository (server) for EMF)
  • Generic Eclipse Modeling System (GEMS )
  • Graphical Modeling Framework (GMF )
253017
de