Model Driven Architecture (MDA)

Introduction

MDA stands for Model Driven Architecture. It is a framework from the Object Management Group (OMG). The basic idea about MDA is to generate code from visual UML models. The idea is known from the CASE tools, but MDA goes further than that. In theory it has capabilities to generate almost the complete code for an application including the SQL statements to create the database. For example an MDA tool can generate a three tier application.

 


 

How does MDA work

Several models are the core of MDA. The model on the highest level is the Computation Independent Model (CIM). This CIM model contains information about the business processes and whether they are going to be implemented or not. The CIM model is usual not implemented in MDA tools, this might be due the mapping between CIM and the PIM isn’t easy to make.

On the second level you’ll find the Platform Independent Model (PIM). The PIM is the model where it commences for most MDA tools. It’s a class diagram and sometimes called a domain model. The PIM is independent from the platform, so one PIM can suit multiple platforms. Independent platform doesn’t mean the operating system that will be used. But it means that the PIM doesn’t contain any information which programming environment will be used (Java or .NET).

The PIM can be transformed to one or more Platform Specific Models (PSMs). For each technology you will need a PSM. For example if you have a multi tier application you need a PSM for each tier. So one for your database, one for the EJBs and one for your JSPs.

When the PIM is transformed into one or more PSMs you can customize the models. For example, if you don’t like the format of the primary keys in your database PSM, then you can customize this model. After you have done the customizations you can generate the code.

 MDA software development

 

 

Building blocks

  • PIM and the PSMs, written in a standard (mentioned under heading ‘Standards’). These models contain information about how the system works.
  • A language to describe the MDA models, like UML.
  • Definitions of how a PIM gets transformed to a PSM.
  • UML tools where you can make the models.
  • MDA tools which can import the models and generate the code.

 

 

Standards

There are several standards for MDA. Some of these standards are in a Request For Proposal (RFP) state.

  • CWM stands for Common Warehouse Metamodel.
  • UML stands for Unified Modeling Language.
  • XMI stands for XML Metadata Interchange.
  • MOF stands for Meta Object Facility.
  • OCL stands for Object Constraint Language.
  • QVT stands for Query View Transformation (RFP).
  • M2T stands for Model To Text (RFP).

 

The advantages of MDA

The productivity increases because the programmers only have to model the system and do a few customizations. Some MDA tools claim 40 percent productivity improvement compared to tools where you have to write most of the code by hand.

The PIM can be used for more platforms. If you decide to change from platform that shouldn’t be a problem (theoretically).

All the bridges between the different PSMs are automatically generated.

Nowadays in most cases the model is the code, however in the case of MDA the code is the model. So it’s easier to maintain and understand the application for outsiders.

If you only have some pieces of your application modeled you’ll be able to do prototyping. All you have to do is to push the ‘Generate code’ button.

 

The disadvantages of MDA

The MDA tools which are nowadays on the market aren’t able to generate 100% code. So you’ll always have to code after the generation process (like complex business rules).

If you want to use a relatively new technology, like JSF (Java Server Faces), then you must keep in mind that the MDA tool is the developer for you. So it takes some time before the producer has implemented a new technology into their MDA tool. Another option is to write your own template. In most tools you can write your own templates but I think that’s a time-consuming occupation.

 

AMIS and MDA

AMIS is looking for an MDA tool and wants to see what MDA is capable of. That’s were I got involved, AMIS offered me a graduate project about productivity improvement. As you expect MDA is an important subject in my thesis.

I have made a list of the most popular MDA tools that I’ve read about in articles, user stories and of course the committed companies which resides on the website of the Object Management Group (OMG).

  • Octopus
  • IBM Rational
  • AndroMDA
  • OptimalJ
  • Together
  • Ameos
  • ArcStyler
  • Codagen
  • MDE Studio
  • FireStorm
  • iQgen
  • b+m Generator Framework
  • Model-In-Action

I judged all the tools on support for MDA, UML models, the amount of technologies and resources. Under resources I understand things like forums, user stories, articles committed to the MDA tool, support from the reseller, etc. After I judged all the tools I concluded that OptimalJ and AndroMDA seemed to be the best tools for AMIS. Within a few weeks I’ll demonstrate on this forum how easy it is to make an application with OptimalJ. And maybe I’ll make a tutorial for AndroMDA too in the near future.

5 Comments

  1. Rob van der Krogt October 10, 2006
  2. Abdelhak JIJANE September 7, 2006
  3. Wolfgang Fahl June 8, 2006
  4. Rob van der Krogt May 3, 2006
  5. Scott Schwab May 2, 2006