Tuesday, September 14, 2004

Model Driven Architecture(MDA)

This post intends to give info on MDA, further to my post on Formal Methods, UML & OCL.

MDA stands for Model Driven Architecture. It is framework defined by OMG for software development. It is an approach to creating designs that can cope with multiple technology deployments of a software system and is based on widely used standards like the Unified Modeling Language (UML). The intention of the MDA is to create machine-readable models that can be understood by automatic tools that generate schemas, code skeletons, testing models, test packs, and integration code for multiple platforms and technologies.

The central idea of the MDA is to develop and maintain an abstract design of a system that can be automatically transformed into multiple platform designs and finally transformed into the code that will realize those deployments. The core of the MDA depends on the three models that are created as part of the software development process, namely,
  1. Platform Independent Model - The PIM is a highly abstracted model that is independent of any implementation technology. It describes a software system that supports a part, or the whole, of business. The PIM may include generic functions, scenarios and class descriptions.
  2. Platform Specific Model - Using the PIM as a foundation it is then transformed into one or more platform specific models, which describes in detail how the PIM is implemented on a specific platform, or technology. Depending on the platforms across which the software system is going to be deployed PSM's will be created - one per platform, or technology. It is common to have many PSM's per PIM.
  3. Code - The detailed designs defined in the PSM's are then transformed into code in the final step of the MDA software development process.
The whole basis is MDA is a tools-based approach. While one or two hardy pioneers have implemented MDA using only a UML modelling tool, a text editor and a steely determination to keep their code and models synchronised, most of the benefits of MDA actually come from having generators to create code, test scripts, database schemas and other development artifacts directly from models. Some researchers and consultants have built their own model transformation tools, and there are some interesting work from a couple of people on using XSLT to transform models expressed in OMG's XMI (XML Metadata Interchange) exchange format. However, for most people, implementing MDA involves buying a vendor's MDA tool. However, because MDA is based on standards like UML, XMI and MOF (Meta Object Facility), buying a tool doesn't mean that you're permanently locked into using only one vendor's product.
When the visions of the MDA are realized there is a number of benefits it would bring to the software development community. The two main benefits are:
  1. Productivity - The developer will focus on the development of a PIM. From the PIM the PSM's and Code will be automatically created via transformations. Because the focus is on the PIM, quite a lot of the technical details of the underlying technologies and platforms do not need to be considered. The Majority of the code will be created through the automated transformation process and as such relatively small parts of code will need to be written (Yes! Coding will still happen). With less focus on the coding and detail design for specific platforms, the developers can spend more time in accommodating business problems. This will ensure better business fit and hopefully a happier user community.
  2. Portability - Portability is achieved via the PIM that is transformed into PSM's for the multiple platforms on which deployment will take place. With the transformation between PIM and PSM automated the PIM becomes totally portable.

There are a number of downsides to the MDA as it exists currently. They are:

  1. Current tools (if they exist?) for automatic transformation from PIM to PSM are not yet sophisticated enough. These automated transformation tools will rely heavily on transformation definitions and rules.
  2. The PIM's, if defined loosely, might not deliver the systems required. To ensure that the PIM's and subsequent PSM's and Code align with business requirements, the PIM's need to be defined precisely. Imprecise definitions will lead to faulty and incomplete systems that may create a huge maintenance overhead.
  3. Portability (in the future), trough transformation from PIM to PSM will probably be cater for the popular platforms, but for the less popular platforms may still remain an issue. Emerging technologies may also be plagued by not having automated transformation tools available in early stages of release
Early-adopters are already using MDA very effectively on real applications, and this will increase over the next few years as major suppliers like Sun, IBM and Microsoft ship MDA tools to their customers. Sun and IBM already provide some MDA support via Netbeans and Eclipse, and there are strong hints that Microsoft will soon ship model-driven tools, including this speech by Bill Gates.

No comments: