Home > Articles > Programming > Java

  • Print
  • + Share This
This chapter is from the book

2.6 EMF and Modeling Standards

EMF is often discussed together with several important modeling standards of the Object Management Group (OMG), including UML, MOF, XMI, and MDA. This section introduces these standards and describes EMF's relationships with them.

2.6.1 Unified Modeling Language

UML is the most widely used standard for describing systems in terms of object concepts. UML is very popular in the specification and design of software, most often software to be written using an object-oriented language. UML emphasizes the idea that complex systems are best described through a number of different views, as no single view can capture all aspects of such a system completely. As such, it includes several different types of model diagrams to capture usage scenarios, class structures, behaviors, and implementations.

EMF is concerned with only one aspect of UML, class modeling. This focus is in no way a rejection of UML's holistic approach. Rather, it is a starting point, based on the pragmatic realization that the task of translating the ideas that can be expressed in various UML diagrams into concrete implementations is very large and very complex.

UML was first standardized by the OMG in 1997. The standard's latest version is 2.1.2; it is available at http://www.omg.org/spec/UML/2.1.2/. The UML2 project, which like EMF belongs to the Eclipse Modeling Project, provides an EMF-based implementation of the UML metamodel.

2.6.2 Meta-Object Facility

Meta-Object Facility (MOF) concretely defines a subset of UML for describing class modeling concepts within an object repository. As such, MOF is comparable to Ecore. However, with a focus on tool integration, rather than metadata repository management, Ecore avoids some of MOF's complexities, resulting in a widely applicable, optimized implementation.

MOF and Ecore have many similarities in their ability to specify classes and their structural and behavioral features, inheritance, packages, and reflection. They differ in the area of life cycle, data type structures, package relationships, and complex aspects of associations.

MOF was first standardized in 1997, at the same time as UML. The standard, which is now at version 2.0, is available at http://www.omg.org/spec/MOF/2.0/.

Development experience from EMF has substantially influenced this latest version of the specification, in terms of the layering of the architecture and the structure of the semantic core. Essential Meta-Object Facility (EMOF) is the new, lightweight core of the metamodel that quite closely resembles Ecore. Because the two models are so similar, EMF is able to support EMOF directly as an alternate XMI serialization of Ecore.

2.6.3 XML Metadata Interchange

XMI is the standard that connects modeling with XML, defining a simple way to serialize models in XML documents. An XMI document's structure closely matches that of the corresponding model, with the same names and an element hierarchy that follows the model's containment hierarchy. As a result, the relationship between a model and its XMI serialization is easy to understand.

Although XMI can be, and is by default, used as the serialization format for instances of any EMF model, it is most appropriate for use with models representing metadata; that is, metamodels, like Ecore itself. We refer to an Ecore model, serialized in XMI 2.0, as Ecore XMI and consider an Ecore XMI (.ecore) file as the canonical form of such a model.

XMI was standardized in 1998, shortly after XML 1.0 was finalized. The latest XMI specification, version 2.1.1, is available at http://www.omg.org/spec/XMI/2.1.1/.

2.6.4 Model Driven Architecture

MDA is an industry architecture proposed by the OMG that addresses full life-cycle application development, data, and application integration standards that work with multiple middleware languages and interchange formats. MDA unifies some of the industry best practices in software architecture, modeling, metadata management, and software transformation technologies that allow a user to develop a modeling specification once and target multiple technology implementations by using precise transformations and mappings.

EMF supports the key MDA concept of using models as input to development and integration tools: in EMF, a model is used to drive code generation and serialization for data interchange.

MDA information and key specifications are available at http://www.omg.org/mda/.

  • + Share This
  • 🔖 Save To Your Account