Sunday, July 11, 2004

Model Driven Architecture: From Theory to Practice, From Promise to Profit


Robert Lario and Rob Mitchell of Inherit LLC spoke to DC SPIN last Wednesday about Model Driven Architecture.

Mitchell began by talking about the evolution of software development. The first computers were programmed with a soldering iron and had to be rewired for every new task. Next came machine code, where each individual bit was loaded with switches; which was followed by assembly code, where each statement corresponded to a single machine instruction.

Third generation languages were developed that could generate multiple instructions to carry out one program statement. (Currently most applications are written in third generation languages.) Fourth generation languages were introduced that could generate an entire application with the specification of a few parameters, but these languages lack flexibility and are not widely used.

Mitchell suggested that software development can learn much from industrial manufacturing. (Technoflak heard Watts Humphrey suggest the same thing.)

Model Driven Architecture is a framework for software development defined by the Object Management Group. The key aspect is the evolution of an abstract business model that is defined in Unified Modeling Language and is driven through a series of transformations into a set of desired work products. Model Driven Architecture advocates the separation of business requirements from the details of the way they are implemented in a specific platform. Mitchell observed that, since business requirements change, separating them from the implementation would make systems more flexible.

Model Driven Archictecture’s major components are:

Platform Independent Model, which specifies a system independently of a supporting platform and does not change from one platform to another. As Mitchell said, the Platform Independent Model has ”nothing to do with the platform and every thing to do with your business.”

Platform Specific Model, the system specification with the platform applied.

Transformations (two major types) -

1. Transforms the independent system specification into one for a particular platform.

2. Transforms the platform specific specifications into resultant work products or artifacts.

Templates

Collections of mappings and business rules that specify a component’s set of design patterns or work products for a specific implementation. They are generally written in the language of the resultant work product. Here Lario broke in, describing templates as ”blueprints for components”.

Archetypes

Collections of templates that together define an end-to-end solution for a specific implementation, a set of business rules that govern how the templates are integrated and implemented. Mitchell observed that the business rules were the ”the glue that holds it all together”. Examples of Archetypes are: Struts/EJBs, Web Services, C# 3-tiered web implementation, etc.

Work products include: descriptors, documents, schemas, and code, in other words, any artifact you can describe within, and create from, a template.

Mitchell went on to say Model Driven Architecture could ”handle a lot of the plumbing, the infrastructure”. He went on to observe that developers often ”spend all their time on infrastructure, not satisfying requirements of customers”. He likened modeling to compilers.

Next Robert Lario walked attendees through a series of examples of the modeling process. He began with an illustration of the development of classes using transportation vehicles as the example. In his example vehicles were first divided into military and commercial, and then classifed as plane, train or car, he then went on to illustrate a Platform Independent Model, using a billing application. He then moved on to a Platform Specific Model, showing how the billing example would be applied in a J2EE environment. The Platform Specific Model is a design model that targets a specific technology. The Platform Independent Model is used for the transformation and is based on a selected archetype. Many Platform Specific Models can be created from the same Platform Independent Model. This is because the business rules are separated from the technology. The Model Driven Architecture work product, the actual code, comes from the Platform Specific Model. Lario pointed out that the work product could be automatically compiled and deployed.

Lario compared archetypes and templates to building architecture. If someone talks about a two-story colonial, you have an immediate mental picture of the house. In the same way developers have an immediate mental picture of a Struts/EJB template.

He gave specific examples of the transformation of models into templates into code. Lario concluded by saying that Model Driven Architecture is the next logical step in software development.

1 comment:

Anonymous said...

Touché, just followed this link from Steve Rubel's blog. My word Alice, get out more ;)

Rich...!
http://missinglink.typepad.com/hello_world/