2.4 Model driven approaches and Architecture
2.4.2 Introduction to MDA
Model Driven Development (MDD), proposed by the Object Management Group (OMG) in 2002, is a fast evolving field Kleppe et al.[2003b], which provides a platform to develop software applications. It provides assistance to the model driven software development process.
2.4. MODEL DRIVEN APPROACHES AND ARCHITECTURE
The basis for MDA is the creation of high-level abstract models. Generally, there is a slight am- biguity in the programming community about the classification of MDSD and MDA concepts. Some of this ambiguity originates from the fact that MDSD efforts without OMG are sometimes referred to as MDA. In this context, Fowler’s description outlining the difference between the two seems more accurate. According toFowler [1997], MDA can be classified as a specific version of MDSD5, which uses the standards of OMG.
2.4.2.1 MDA Framework
There are several major participants, as mentioned below, which together make up the MDA framework:
1. Models – These are further divided into Platform-independent model (PIM), and Platform- specific model (PSM).
2. Languages – These include the languages in which models are created, the transformation definition languages and the meta-languages.
3. Transformations – This also includes tools with which to perform transformations. Figure 2.9 illustrates a basic diagrammatic representation of the MDA concepts and Fig- ure 2.10 highlights the differences between basic, extended, and complete frameworks of MDA.
Domain-Ralated Specification
CORBA
Model J2EE Model XML Model
CORBA/C++ Code J2EE/JAVA Code XML Code PIM Model-to-Model Transformation PSM Model-to Code Trans- formation Implementation
Figure 2.9: Basic concepts of MDA,Stahl et al.[2006].
Models are the most important aspects of the MDA. The basic elements and features of models in this approach are:
Metalanguage Metalanguage + Basic Elements Form Extended MDA Transformation definition language Exntends Transformation definition
language + Extended MDA Elements Form
Complete MDA
Basic MDA elements
Transformation definition Language 1 Language 2 PIM PSM Transformation Tool Is used by Is written in Is written in Is written in Is written in
Figure 2.10: The basic, extended, and complete MDA framework,Kleppe et al.[2003a]. 1. Models are used to represent the system of interest and can be of two types:
• Models that are independent from the platform in which the system is going to be implemented, known as Platform-independent model (PIM)s.
• Models which are aimed at specific platforms and will not work with other platforms, known as Platform-specific model (PSM)s. The PIMs are usually created using mod- elling languages like UML/SysML. PSMs can be created in different languages de- pending upon the needs specified, as illustrated in Figure 2.9.
2. A model is described using a well-defined language. Models in one language can be con- verted into models in another language using transformation definitions.
3. Transformations from one model to another are done using transformation languages which are well-formed languages working with a set of transformation tools. The tools read the instructions, written in a transformation language, as definitions and execute them at the Meta-level.
4. The transformation definition languages and the modelling languages either use or extend meta-languages. Meta-model languages and Transformation languages are important parts of MDA,Kleppe et al.[2003a].
It is seen that the aim of MDA is to separate the platform details from the business logic. This essentially means that business logic, design and specifications should be platform-independent and should behave in the same manner irrespective of the underlying technologies. This ensures that changes in technology do not hamper the application behaviour and also that the business knowledge is not bound to the technical details, and remains common across platforms. All this
2.4. MODEL DRIVEN APPROACHES AND ARCHITECTURE
ultimately means adhering to the separation of concern concept, and that models comprise the core of the system and different platform-specific codes can be generated as long as the models are available.
In the Model Driven Architecture approach, developers usually concern themselves with the development of platform independent models. These models are then converted to platform specific models using tools, which are able to understand the definitions. These operations are performed in stages sequentially. After creation of the PSMs, they are further transformed into code. The entire process can be defined in one line as illustrated in Figure 2.11.
PIM Transformation PSM Transformation CODE
Figure 2.11: MDA basic process.
These factors indicate that the life cycle of MDA follows traditional life cycles, like wa- terfall, wherein the steps are carried out sequentially and each step in the sequence produces an output which can be used as input for the next stage. The output models are usually machine- understandable just like traditional models except for the fact that the conversion from one model to another is done with the help of tools as opposed to the traditional manual processes. Seman- tically, all these models are well-defined using modelling languages with the aid of software patterns and styles. The majority of these models are bound with Object Oriented (OO) con- cepts and methods. The association of OO methods with MDA concepts is explored in the next section.