Sunday, September 18, 2011

MDA: Model Driven Architecture and Executable UML

When people talk about the UML, they also often talk about Model Driven Architecture (MDA) [kleppe et al.]. Essentially, MDA is a Standard Approach to using the UML as a programming language ; the standard is controlled by the OMG, as is the UML. By producing a modeling environment that conforms to the MDA, vendors can create models that can also work with other MDA-compliant environments.

MDA is often talked about in the same breath as the UML beeause MDA uses the UML as its basic modeling language. But, of course, you don't have to be using MDA to use the UML.

MDA divides development work into two main areas . Modelers represent a particular application by creating a Platform Independent Model (PIM) . The PIM is a UML model that is independent of any particular technology. Tools can then turn a PIM into a Platform Specific Model (PSM).

The PSM is a model of a System targeted to a specific execution environment. Further tools then take the PSM and generate code tor that platform . The PSM Gould be UML but doesn't have to be. So if you want to build a warehousing system using MDA, yon would start by creating a single PIM of your warehousing system .

If you then wanted this warehousing system to run on JEE and NET, you would use some vendor tools to create two PSMs : one for Each platform . Then further tools would generate code for the two platforms.

If the process of going from PIM to PSM to final code is completely automated, we have the UML as programming language. if any of the steps is manual, we have blueprints.

Steve Mellor has long been active in this kind of work and has recently used the term Executable UML [ Mellor and Balcer] . Executable UML is similar to MDA but uses slightly different terms . Similarly, you begin with a platform-independent model that is equivalent to MDA's PIM . However, the next step is to use a Model Compiler to turn that UML model into a deployable system in a single step ; hence, there's no need for the PSM.

As the term compiler suggests, this step is completely automatic .The model compilers are based on reusable archetypes . An archetype describes how to take an executable UML model and turn it into a particular
programming platform . So for the warehousing example, you would buy a model compilcr and two archetypes (JEE and .NET) . Rum each archetype on your executable UML model, and you have your two versions of the warehousing system .


Executable UML does not use the full UML Standard ; many constructs of UML are considered to be unnecessary and are therefore not used . As a result, Executable UML is simpler than Full UML.

All this Sounds good, but how realistic is it? In my view, there are to issues here. First is the question of the tools : whether they are mature enough to do the job . This is something that changes over time;certainly,
as I write this, they aren't widely used, and I haven't seen much of them in action.

A more fundamental issue is the whole notion of the UML as a programming language . In my view, it's worth using the UML. as a programming language only if it results in something that's significantly more
productive than using another programming language. I'm not convinced that it is, based an various graphical development environments I've worked with in the past.

Even if it is more productive, it still needs to get a critical mass of users for it to make the mainstream . That's a big hurdle in itself. Like many,old Smalltalkers, 1 consider Smalltalk to he rauch more productive than current mainstream languages . But as Smalltalk is now only a niche language, I don't see many projects using it . To avoid Smalltalk's fate, the UML has to be luckier, even if it is superior.