Friday, February 29, 2008

Model Driven Architecture

Model Driven Architecture (MDA)
Model Driven Architecture is an approach to translating real-world algorithms into computer code; it’s an automatic translation of models into code.

MDA focuses on representing algorithms in a modeling language, followed by automatic translation of models into codes. Doing justice to the definition of MDA’s innovation requires a short, potted history of computers. Without instructions, or code, computers are just expensive heaters. One of the main problems of the Computer Age has been how to give computers instructions to translate human desire into outputs.

For about 50 years, the answer has been to code in text-based languages, all of which try to aid programming. The first of these text-based languages was assembly, which is more human-readable than machine code.

FORTRAN, which stands for “formula translator”, was the next step in divorcing programmers from a required knowledge of hardware. It hides the computer architecture of registers and present a syntax that allows humans to concentrate on creating algorithms. FORTRAN incidentally fortifies the notion of free-floating subroutines and functions.

Other third-generation languages have offered varieties of abstraction from computer hardware, imposing rules and providing new ways for organizing algorithms and data. Type-safe languages have taken a stab at preventing programmers from making certain mistakes. Permissive languages, which allow easy casting of pointers, have enabled programmers to do all kinds of marvelous things, including stringing up their own coding nooses.

Different approaches to managing algorithms have been developed. Programming languages that facilitate these paradigms have been created, and libraries of code have been published.

A culture of best practices, peer reviews and modeling has arisen to help create software that contains fewer errors and that is more efficient.

Model Methodology
Unified Modeling Language (UML) has been promoted by Object Management Group Inc. (OMG). It has become the language for modeling algorithms and has been adopted by the software community a large. Originally, an algorithm was expressed in UML before it was manually translated into a text-based language, which was then automatically compiled into assembly language and machine code. But that raised the question of whether the models themselves could be compiled into machine code, thus improving ways to think about algorithms and to produce software. Efforts to make the process simple and universal were the genesis of the paradigm shift that has led to MDA.

The OMG turned its attention from Common Object Request Broker Architecture to MDA with a white paper in 2000, beginning an effort at classification and standardization and it the process producing a new lexicon, including core notions of the platform-independent model (PIM), platform-specific model (PSM) and Meta-Object Facility (MOF). UML has a role in MDA, but models do not have to be created in UML to conform to the OMG’s MDA. Instead, both text-based and graphical languages must conform to MOF, which could be called a kind of mother language. MOF is general and universal that the disparate companies that make up the OMG do not have to agree to use the same modeling languages. They only have to agree to follow the same principles.

After requirements analysis, modeling in MDA begins with PIMs. These models are meant to capture an algorithm but to ignore the computer hardware and software. The models are intended to be pure expressions of the algorithm, with the best division between design and implementation. PIMs are translated into PSMs in the next stage, “compilation,” in which the algorithms are made more ready to run. PSM have features that correspond to the capabilities of hardware and software. Also, PIMs may have been “marked” to facilitate this transformation. Finally, PSMs are translated into actual code, which will run on actual hardware or on actual middleware on actual hardware.

The vision behind MDA is to automate as much of the process of code generation as possible. Using tools and languages that will make the design as good as possible, the implementation will come later and will have as little of the pesky interference of fallible humans as possible. If the underlying hardware or operating system is changed, the model is simply “recompiled” or “retranslated” to work on the new system. If maintenance is required, the model serves as an accurate document of how the algorithm works, and only the model needs to be maintained. The idea is that implementation and coding errors will be minimized. The OMG lists several projects on its website that have successfully used automated MDA to produce efficient, successful code with fewer resources that would have been used in more traditional projects. These include work done for Wisconsin’s Department of Workforce Development, Postgirot Bank AB, Looking Glass Network Inc., Credit Suisse Group and others.

No comments: