Home‎ > ‎Architecture‎ > ‎

Model Driven Architecture MDA

posted Aug 27, 2014, 1:35 PM by Jageshwar Tripathi   [ updated Sep 4, 2014, 3:09 PM ]
Gartner identified MDA as an "on the rise" technology in its 2006 "Hype Cycle". There were others who promoted, praised and supported this concept. In year 2014 while managers, clients and organizations are focusing on Agile development (everything agile) focus on MDA seems lost but there are strong reasons to believe on engineering side of the software development (more argument on this topic later). 
Note: There were many companies or organizations who were working in this area and they had some tools for MDA but many of them moved their products to opensource, went to eclipse project. Some of them were acquired. If you try to look into this topic you will find most of the writings from year 2002 to 2004 or maximum till 2006. So it is a dead topic (looks like).

What is MDA or model driven architecture?

Basic idea is to model the domain or business (requirements) and the model should not be platform, programming language or computation specific. It should represent the business.


The advantage of this approach is that you have a model using which you should be able to go for any language or platform of your choice for implementation. If you don't follow this approach and you only have a platform specific model/code it will be difficult to change the platform. If you have a platform independent model, using a transformation tool you can create platform specific model of your preferred language or platform and by using another tool you can generate code from this platform specific model.
MDA

PIM

Platform independent model is the starting of MDA. Generally it is created using UML (unified modeling language) but as per OMG (object management group who defines the specification) UML is not mandatory to define PIM or other MDA models. OMG specification says: "model can be created using any modeling language which is based on MOF (MetaObject Facility). PIM models business functionality in platform and language neutral way.

PIM can further be divided in to two parts: computation independent model (CIM) and platform independent component model (PICM)

PSM

Platform specific model is the model which is derived from PIM and this translation is done by MDA tools.
From PSM, code can be generated using tools.

Mapping

It defines how PIM will be transformed in to PSM. It is rules to transform PIM to PSM. 

Transformation

Process of converting PIM to PSM

MDA Specification

  •  Unified Modeling Language (UML) [Note: not mandatory as per OMG]
  • Meta-Object Facility (MOF)
  • XML Metadata Interchange (XMI)
  • Enterprise Distributed Object Computing (EDOC)
  • Software Process Engineering Metamodel (SPEM)
  • Common Warehouse Metamodel (CWM)

Steps in MDA

MDA Steps

MDA Tools

Open source tools

 Tool Community Features
AndroMDA * http://www.andromda.org/ Takes model and generates code. Model elements are processed using plugins called cartridge. Available cartridges are: BPM4Struts, jBPM, JSF, EJB, EJB3, Hibernate, Java, Meta, Spring, WebService, XmlSchema
Eclipse Modeling Framework http://www.eclipse.org/modeling/mdt/ Set of framework and tools to give platform for modelling tools
Jamda    http://jamda.sourceforge.net/ It's model compiler. Takes domain model, adds other classes and generates code.
J2EE focused (requires a reasonable level of Java knowledge to use)
 OpenAmeos https://www.scopeforge.de/cb/project/8 Templates for Java, C++, C, Ada95, C#
UML 1.x supported and moving to UML 2.0
 openMDX http://www.openmdx.org/ As per its website: "helps you in writing service-oriented, platform-independent applications".
UML Modeling tool is separately needed.
J2EE focused
 Modelio http://www.modelio.org/ UML Modeler, BPMN , Java code generation, XMI import/export

Commercial tools

 ToolCompany Features
UModel * Altova Enterprise edition supports platform independent UML modeling and model transformation along with basic and professional features like UML modeling, database modeling etc.
UML 2.4 support
Round trip engineering (code to model, model to code)
Code generation in Java, C# and Visual Basic (versions of Java, C# not mentioned)

 Together Borland (a Microfocus Company as of writing) Code generators for Java, J2EE®, C++, and C#. Modeling, BMN 
Rational Software Architect * IBMUML modeling, codegeneration, roundtrip, BPMN support
 Blu Age Forward Blu Age (owned by- Netfective Technology) Eclipse built-in MDA tool. JEE, .NET
Company more focused in providing legacy modernization solutions
 Rhapsody    IBM Coexists with RSA. Came from Telelogic. More expertise in system engineering, realtime software development.  Visually develop C++, C, Java and C# applications using UML or AUTOSAR, reverse engineering, generate code frames (including MISRA-C and MISRA-C++)
 Enterprise Architect * Sparxsystems Built-in transformation for C#, DDL,EJB, Java, JUnit, NUnit, WSDL, XSD


Factors to consider while selecting a MDA tool

  • Full MDA tool or partial (PIM to code generation and vice versa complete round-trip)
  • Code generation method
  • Script language (if applicable)
  • PIM to PSM capability
  • Model validation
  •  Version of Meta Object Facility (MOF)
  • XMI import/export support
  • Commercial or Opensource (License cost to use for commercial purposes)
  • Support for executable model creation and ease of creating executable models
  • Vendor lock-in due to generated code

Agile MDA

Executable models is the core of this concept. For this purpose code and executable models are considered to be the same. So if you have a model which can be executed then you have faster cycles of model to build, running the test and doing it again. Now to make it agile first thing you have to do it leave analysis and design models aside. There is only one thing and it is executable model and that is equivalent to code. 
A UML profile defines execution rules. Set of classes and objects communicate using state machine. On change of state, state machine triggers actions and this way functional computation, data access etc is executed.

Concerns

The idea is good but there are and were some practical difficulties:
1. Transformation tools without vendor locking had been a challenge due to interoperability (also see point number 4 bellow)
2. Do we really go to implement our application from one programming language to another? If not often, what is the use of platform independent model? This raises question  of value proposition. Another angle to this is quality of code produced: We know that complexity of the problem (business requirements) is going to exist whether you use MDA or not. Maintaining quality of generated code can be a concern when it is produced by translation or transformation from an abstract level model. 
3. Specifications (MDA) were not complete for a long time so how things could work seamlessly?
4. Are implementers of tools (major vendors) ready to adhere to common standards so that tools and transformation can correctly work on the PIM? They never agree because if all of them start producing things without their own propriety specific feature why one would buy their costly licenses.
5. In the age of (and in the name of) agile/scrum and daily builds, do people really care about creating models and those models in such a way that code/skeleton can be generated? I have heard many project teams saying our code is our mode and design. 
6. Tool vendors presented very good products but complete round-trip ( Abstract mode to specific mode land then code or vice versa) was not 100% successful in all the scenarios.  

Interesting resources

Research papers on tools comparison:

1. Comparative analysis if MDA tools: http://www.studiainformatica.ii.uph.edu.pl/download/124.pdf
2. An evaluation of Model Driven Architecture tools: http://csb.uncw.edu/mscsis/complete/pdf/RichardAlford.pdf
3. Comparison of MDA tools: http://www.wittmannclan.com/ptr/cs/mda_compare.pdf
4. http://www.drdobbs.com/a-special-guide-mda-and-uml-tools-case-2/184415500

Other papers:

1. Comparison of Model-Driven Architecture and Software Factories in the Context of Model-Driven Development ftp://ftp.inf.puc-rio.br/pub/docs/FomularioSolicitacoes/LeandraMara-06-08-23494.pdf
2. MDA specification: http://www.omg.org/mda/specs.htm
3. http://www.slideshare.net/JuhaPekkaTolvanen/20-examples-on-domain-specific-modeling
4. http://www.agilemodeling.com/essays/mda.htm
5. Model Driven Development for J2EE Utilizing a Model Driven Architecture (MDA) approach http://www.omg.org/mda/mda_files/MDA_Comparison-TMC_final.pdf
6. Modeling approaches: http://www.agilemodeling.com/essays/modelingApproaches.htm
7. http://www.omg.org/mda/mda_files/Agile_MDA.pdf

Comments