Table of Contents Previous Section Next Section

8.7 Model-Driven Architecture

MDA is an approach to system development that uses a layered architecture of models for software system descriptions and development. The system descriptions are used to describe the system at various levels of abstraction, each of which highlights specific viewpoints into the system. The driving force behind the use of a MDA is the recognition that a software system will be eventually developed and deployed to one or more software platforms. A platform is the specification of the software execution environment for models. For example, a Java Virtual Machine and an Apache Web Server for Linux are both considered platforms capable of executing a detailed enough model. With the current rapid pace of change in the software industry, platforms are likely to change far more rapidly than the need for the functionality provided by a software system. Furthermore, the platform specifics also tend to change far more rapidly than a higher level abstract model of a particular software system. MDA attempts to devote more resources to the higher level models that are traditionally less susceptible to change than platform details. It uses this model to re-create selectively lower level constructs in support of technology migration as needed and in so doing enables the system to evolve at the higher level independently of lower level platform changes.

Three primary OMG specifications form the basis of MDA: the Meta-Object Facility (MOF), the Common Warehouse Metamodel (CWM), and the XML Metadata Interchange (XMI). These three specifications allow the creation and modification of the higher level metamodels that are most resistant to platform and technology-related changes at lower levels. The MOF provides a standard repository for models defined using UML and integrates various models and views in a structure that facilitates multiple groups to collaborate, modify, and view the model. In addition to the language- and platform-independent UML models, the MOF also contains the various platform-specific models required to express fully the technology and configuration details to generate application components for a targeted environment. The CWM is the storage-management-focused part of MDA and allows the specification of how to represent database models, transform schema models, and integrate with database, OLAP, and data mining tools. The XMI is a mapping for the exchange of model information and defines how to express UML models in XML and transport them among enterprise modeling tools that support various levels of analysis, modeling, and transformation application development.

In MDA, a model is an instance of a particular metamodel, where the metamodel describes a model at a higher level of abstraction. If a metamodel refers to attributes that describe properties of a particular platform, then a model derived from the metamodel is platform specific. If a model describes a system at a high enough level to be implemented on different platforms, then it is platform independent. For example, if a metamodel attribute is of type "string," then a model derived from it maps the "string"type to the Java class java.lang.String, which would be platform specific. If, for some reason, a model derived from the same metamodel avoided specifying language and platform-specific constructs, then it would be platform independent. It is highly desirable in MDA to have mappings among metamodels and models to be automated. A variety of tools support MDA primarily by providing the capability to automate to various extents the mapping from various models down to the level of generating code for the final application. Such tools generally also have the capability to keep the various models in sync as work is performed at any of the several possible abstraction levels. A goal of mapping between models is to take one or more models as input and produce one output model. The rules for how to perform such a mapping are described by the mapping technique. A mapping technique generally has two parts. First, the modeler must provide adequate annotations and descriptive information about the source metamodels. Then, the mapping is executed, and a new model, an instance of the metamodel, is created.

For example, if a mapping technique were to describe how to map a UML model into a corresponding CORBA target model, the description would have encoded a rule to map UML-defined classes into a CORBA namespace containing the corresponding IDL interfaces. This model could then be used as input into yet another mapping technique to generate a language-specific model that would define whether to map the IDL interfaces into platform-specific Java interfaces, classes, or both.

The vision behind MDA is to enable software developers to devote more resources to the higher level models in MOF, CWM, and XMI and to rely upon tools to map to one of many possible platform-specific models. The models in the MOF describe how applications and systems are organized and integrated and the relationships between them at the process level. After these relationships are defined and documented in high-level models, tools can be used to generate the bulk of the application source code such that moving the higher level models to new platform-specific models will preserve most of the investment initially made to reduce the software development cost in the long term. By enabling much of the final structure of the code to be determined by higher level analysis and decision making, MDA attempts to raise the level of software engineering and hopefully provide greater efficiencies in the software development process. However, be mindful that this is based on having tool support for round-trip engineering that would enable developers to work at various levels and have their changes propagated down to the application level through code generation but also to have significant code changes propagated back up to the UML models in the MOF layers. Having sufficient tool support for this capability is essential for recovering the investments made using the MDA approach.

    Table of Contents Previous Section Next Section