Skip to main content

Model Driven Architecture MDA

 

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.


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 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

Popular posts from this blog

Virtual environments in python

 Creating virtual environments is essential for isolating dependencies and ensuring consistency across different projects. Here are the main methods and tools available, along with their pros, cons, and recommendations : 1. venv (Built-in Python Virtual Environment) Overview: venv is a lightweight virtual environment module included in Python (since Python 3.3). It allows you to create isolated environments without additional dependencies. How to Use: python -m venv myenv source myenv/bin/activate # On macOS/Linux myenv\Scripts\activate # On Windows Pros: ✅ Built-in – No need to install anything extra. ✅ Lightweight – Minimal overhead compared to other tools. ✅ Works across all platforms . ✅ Good for simple projects . Cons: ❌ No dependency management – You still need pip and requirements.txt . ❌ Not as feature-rich as other tools . ❌ No package isolation per project directory (requires manual activation). Recommendation: Use venv if you need a simple, lightweight solut...

Building a Simple Text Generator: A Hands-on Introduction

Introduction Text generation is one of the most exciting applications of Natural Language Processing (NLP) . From autocorrect and chatbots to AI-generated stories and news articles , text generation models help machines produce human-like text. In this blog post, we’ll introduce a simple yet effective text generation method using Markov Chains . Unlike deep learning models like GPT, this approach doesn’t require complex neural networks—it relies on probability-based word transitions to create text. We’ll walk through: ✅ The concept of Markov Chains and how they apply to text generation. ✅ A step-by-step implementation , fetching Wikipedia text and training a basic text generator. ✅ Example outputs and future improvements. The Concept of Markov Chains in Text Generation A Markov Chain is a probabilistic model that predicts future states (or words) based only on the current state (or word), rather than the full sentence history. How it works in text generation: 1️⃣ We analyze a gi...

Mastering Trade-Off Analysis in System Architecture: A Strategic Guide for Architects

 In system architecture and design, balancing conflicting system qualities is both an art and a science. Trade-off analysis is a strategic evaluation process that enables architects to make informed decisions that align with business goals and technical constraints. By prioritizing essential system attributes while acknowledging inevitable compromises, architects can craft resilient and efficient solutions. This enhanced guide provides actionable insights and recommendations for architects aiming to master trade-off analysis for impactful architectural decisions. 1. Understanding Trade-Off Analysis Trade-off analysis involves identifying and evaluating the conflicting requirements and design decisions within a system. Architects must balance critical aspects like performance, scalability, cost, security, and maintainability. Since no system can be optimized for every quality simultaneously, prioritization based on project goals is essential. Actionable Insights: Define key quality ...