Thursday 2 September 2010

AndroMDA vs Acceleo (MDA)

Objective

The aim of this paper is a brief introduction to MDA technology and a summary / comparison to the approachments to MDA of AndroMDA and Acceleo, intending to be a practical and understandable summary

Introduction

Model-driven architecture (MDA) is a software design approach for the development of software systems. It provides a set of guidelines for the structuring of specifications, which are expressed as models. It was launched by the Object Management Group (OMG) in 2001

The Model-Driven Architecture approach defines system functionality using a platform-independent model (PIM) using an appropriate domain-specific language (DSL).

One of the main aims of the MDA is to separate design from architecture. As the concepts and technologies used to realize designs and the concepts and technologies used to realize architectures have changed at their own pace, decoupling them allows system developers to choose from the best and most fitting in both domains. The design addresses the functional (use case) requirements while architecture provides the infrastructure through which non-functional requirements like scalability, reliability and performance are realized. MDA envisages that the platform independent model (PIM), which represents a conceptual design realizing the functional requirements, will survive changes in realization technologies and software architectures.

To sum up:

  • Models are produced at business level, and translated into code using code generation tools
  • The skill to move from model to implementation reduces most of the coding efforts
  • By having the models in the first iteration of software construction, allows the possibility of obtaining an executable prototype system in early stages of project life cycle
  • The transformation's rules for going from model to code are common to all similar projects, therefore the same rules apply to any project developing software allows a consistent software related to its quality and use of standards
Pros of MDA:

  • Focus on the business
  • Updated documentation. The process is, first change the model and then, regenerate the code.
  • Less application errors: “The best way to avoid dangerous coding errors is to code less”
  • Portability of the technology: If there's a new technology, by updating the PSM we can generate the code in the new technology
Cons of MDA:

  • If we don't have code generated by the MDA, we can't apply MDA.
  • The creation of components for the code automation is very complex
  • Refactoring. A change in the model involves a change in the code, therefor the sincronization between the new code generted and the original code implemented by the developer is always a delicate step (despite having tools that facilitate this task, this step is always delicate).

ANDROMDA:

Creator: Matthias Bohlen
Current state of the project:

  • AndroMDA 3.3 ( 2009-04-02) is the latest stable release (only supports UML 1.x)
  • AndroMDA 3.4 -snapshot (2010-02-14) supports UML 2.x: all the modern versions of uml tools use UML 2.x
  • AndroMDA 4: is on hold
  • AndroMDA-eclipse plugin: seems to be hold, version 1.0-M3 since 2006

Features:

  1. Open source framework that receives as an input a UML model that combined with suitable cartridges AndroMDA (model for technology mapping. NET, J2EE …), generates the source.
  2. AndroMDA cartridges are developed in velocty template (http://velocity.apache.org/). AndroMDA comes with a series of cartridges for the comprehensive code generation: BPM4Struts, jBPM, JSF, EJB, EJB3, Hibernate, Java, Meta, Spring, WebService and Xmlschema
  3. The sincronice of the model and the code generated by AndroMDA is done by taking into account that the code generated by AndroMDA consists of final classes that can't be modified by developers and abstract classes / interfaces, on which the developer implements the logic of business.That is the strategy for code generation is the direct heritange and delegation, therefore we depend on the final language and on the language structures to be able to generate final code, complex or not.
  4. AndroMDA is integrated with maven, but not with eclipse. Therefore, the management of new projects and code's generation will be done through the command line or ant task. For implementing a project with AndroMDA, we'll subdivid into: a MDA project (where AndroMDA generates code from the model) and a Development Project (where development and testing take place).




Community support: AndroMDA has maybe, one of biggest community of a MDA framework



ACCELEO

Creator: Obeo
Current state of the project:


Features (Acceleo 3):

  1. Acceleo is an implementation of the Object Management Group (OMG) MOF Model to Text Language (MTL) standard. This component is an entirely new development of the OMG MOF Model to Text (Mof2Text) http://www.omg.org/spec/MOFM2T/1.0/ language. The implementation will be compliant
  2. The development of the code generation's modules is done by acceleo type projects in eclipse.There are currently very basic examples of code generation for Python and Java. In version 2 we can find more complex modules of generation. Acceleo focuses on supporting the creation of code generation, so it is really easy to create new modules: preview of the final result of the generation, debug, launch generation integrated in eclipse.
  3. The sincronization between the model and the code generated by Acceleo is done through special tag's (in the code generation templates) that shows the developer where to enter the specific new code. This makes that the final code generated by Acceleo can be very complex.. It could happened as well that a non-skillfull (clueless) developer removes special tags and then, the new code generated by Acceleo will not repect the code created by the developer.
  4. Code generation from a model and code generation module is done through an integrated implementation task in eclipse. And configured through a wizard of the eclipse. The implementation of an Acceleo project would be the usual with eclipse, because the generated code is integrated into the development of the developer.




Community support: it's not as big as AndroMDA's community, but I have to say that was great to make a question in its forum and have a quick reponse






That's all folks! 
Please if you see any incoherent, feel free to make corrections / suggestions.