Metamodels and Platforms

A metamodel is simply a model of a modelling language. It defines the structure, semantics, and constraints for a family of models. (Note that we're using the term family here to group models that share common syntax and semantics.)

A model is captured by a particular metamodel. For example, a model that employs UML diagrams is captured by the UML metamodel, which describes how UML models can be structured, the elements they can contain, and the properties those elements exhibit. In turn, a metamodel may describe some properties of a particular platform, not only the UML, while a platform's properties may be described by more than one metamodel. Figure 2-1 is a UML class diagram that illustrates these relationships.

Figure 2-1. Models, metamodels, and platforms


We define a platform as the specification of an execution environment for a set of models. Examples of platforms include the Java platform; CORBA; .NET; operating systems like Linux, Solaris, and Windows; and specific real-time platforms.

A platform has to have an implementation of the specification that the platform represents in other words, at least one realization of it. A realization can in turn build upon one or more other platforms. A realization that stands on its own is a primitive realization; a realization comprised of one or more realizations is a composed realization. In theory, this platform stack can extend down to the level of quantum mechanics, but for our purposes, platforms are only of interest as long as we want to create, edit, or view models that can be executed on them. Figure 2-2 illustrates these concepts in the context of models and metamodels.

Figure 2-2. Platforms and platform realizations[1]


[1] Thanks to iO Software for contributing this and other figures that appear in this chapter.

The UML metamodel is expressed using the MOF, a facility specified and standardized by the OMG. This metamodel describes many structural and behavioral aspects of UML models, but it doesn't specify how UML models are stored, how they're graphically represented, or how they could be edited by multiple users simultaneously. These are the details that the MOF metamodel abstracts out. What the MOF does do is define how models can be accessed and interchanged, in terms of, for example, interfaces defined using the OMG's XML Metadata Interchange (XMI). Other examples of metamodels include the Java language specification and the Common Warehouse Metamodel (CWM).

Chapter 4 contains an in-depth exploration of metamodels. Chapter 8 discusses a very important aspect of MDA with regard to a platform stack: linking models within the stack to existing code. Chapter 12 explores platforms in the context of executing an MDA process.

MDA Distilled. Principles of Model-Driven Architecture
MDA Distilled. Principles of Model-Driven Architecture
ISBN: B00866PUN2
Year: 2003
Pages: 134 © 2008-2017.
If you may any questions please contact us: