In the last posts, we have treated about *what* MDA aims to do. Now I’m going to introduce you *how* MDA aims to do it.
Firstly, I advice you I will need to use some more *technical terms*, and, as a large explanation about them could be very cumbersome here, if you fell in some doubt you can go to the Glossary page and clear it or just google it for more details. OK?
The MDA Framework is, in essence, a set of concepts you need to understand MDA.
So, try to read and understand the figure below.
It is a simplified version of the MDA Framework, and it is very straightforward to see what it does.
First, a Computational Independent Model (CIM), that is a model of the bussiness rules of the system in focus and has no computer implementation details specification, is transformed into a Platform Independent Model (PIM), a high level model tied to computational concepts but not to a computer platform specific implementation. Second, the PIM is transformed into a Platform Specific Model (PSM), a model of a specific computer platform implementation. Third, the model with platform specific information (the PSM) is translated into code.
Performing this steps, in an ideal scenario, would be enough to have a runnig system.
So, things seems to be very straightforward in MDA, doesn’t it? Not so simple as it seems in the last figure, but not so complicated, as you can see in the next. See below a more detailed version of the MDA Framework.
Have you completely understood it? If your answer is “For sure, I have!”, feel comfortable to leave this post, but if it is something like “Not at all” or “A little bit”, I will give you some explanation.
Let’s read this figure from bottom to up, OK? You can see that the process [CIM->]PIM->PSM->Code is the same as we had presented in the previous figure (Simplified MDA Framework), except from the lack of the CIM representation here, for the sake of simplicity.
The input or output models for each transformation are writen in some language, e.g. UML for PIMs and Java for PSMs. In our figure, the PIM is writen in language 1 and the PSM is writen in language 2.
The transformation from PIM to PSM is performed by a transformation tool that uses a transformation definition. This definition is a set of transformation rules which maps elements in language 1 to elements in language 2. For instance, in a simple transformation from UML to Java, UML classes could be mapped to Java classes, UML attributes to Java attributes, and UML operations to Java methods.
Just as models, transformation definitions are also writen in some language, called transformation definition languages.
For each model language (language 1 and language 2) and transformation language (transformation definition language) there is a metalanguage which descbribes them, generally called metamodel. Once, in a Java model, you have an if statement, in the metamodel of the Java language you have a description of such statement, and this happens for each element of the Java language.
As models are described by metamodels, metamodels are described by metametamodels, and metametamodels generally describes itself. The OMG standard metametamodel is the Meta Object Facility Language (MOF). Another metametamodel is Ecore, it is an Eclipse standard since this is the metametamodel for implementations in the Eclipse Modelling Framework (EMF), the framework for supporting MDA solutions in the Eclipse platform.
Since OMG has published the MOF2Text specification, we have included in the right side of the figure, the part concerning the transformation from models to concrete code.
This kind of transformation is also made by a transformation tool that uses a transformation definition writen in some transformation specification language that conforms to MOF. The main difference between model-to-model (M2M) transformations and model-to-text (M2T) transformations is that the last ones does not declare an output metamodel, as the output is textual code.
Well, this is the MDA framework. I hope you understood it.





