Java Industry News
i-Technology Viewpoint: Is Model Driven Architecture Coming Into Its Own?
MDA has been with us for years; will the arrival of meta-data bring it closer to the mainstream?
Oct. 13, 2005 10:15 AM
JDJ's Bill Dudney (pictured) writes: With the popularity of Object Relational Mapping tools like Hibernate and Cayenne, developers are more often than other giving control of some of their code to models. Will this help raise MDA into the mainstream? Will MDA take its hoped-for place as the next level of abstraction for developers?
What about MDA
Model Driven Architecture, also known as MDA, started in late 2000 with a white paper. Basically the idea is that we define the software we want to build in sophisticated models that capture the detail of the application. Then from these abstract models a series of transformations is applied to turn that abstract model into a running application. The highest-level model is referred to as a Platform Independent Model (PIM). There is an even more abstract model called a Computational Independent Model but we won't discuss that model. The PIM is, as the name suggests, independent of the deployment platform (i.e. .NET Java EE 5 etc.) In this model the business is specified, classes that make up the domain are fleshed out and specified. This model is then transformed into one or more Platform Specific Models (PSM) that can be elaborated with more detail specific to the platform. From the PSM a running application can be generated.
Now of course there is a need to put in your own business logic. Most tools today provide a way for you to edit the 'business logic' apart from the fully generated code. For example AndroMDA (an open source MDA tool) will generate some files only once (where your business logic is written). Other tools like OptimalJ take a different approach giving you code you can edit and 'protected blocks' that are part of the generated code. I'm sure there are other approaches as well that are taken by other tools.
- Productivity - the ability to raise the level of abstraction so that developers can become more productive is one of the greatest promises of MDA. Just as Java raised the level of abstraction from C/C++ so MDA raises the level abstraction for Java EE / .NET.
- Portability - greater ease of migration between various technologies (such as .NET to Java EE) or between different versions of the same technology (i.e. EJB 2.1 to EJB 3.0). Once developed your PIM is the repository of knowledge about your application, so moving to another underlying technology is 'easy'.
- Consistency - greater consistency of application architectural principals. This feature is hard to ignore. Many enterprise level projects have divergent architectures on the same project. Maintenance is very difficult in these projects to be sure.
At its core MDA is about using meta-data to drive program creation. The idea is that if we can develop a sophisticated enough model to express software then we can fully generate the actual running program from the model (or even create a virtual machine that could execute the model). The problem with taking this idea too far of course is that we end up with just another platform. Probably even worse though is that it's 'programming with pictures' which was already tried at least once in the late 80s and failed miserably. Few are willing to try programming with pictures again.
Many proponents of the MDA approach like to say that given a PIM with sufficient detail one would be free to move between .NET, Java EE or to something like Hibernate & Spring assuming that you had the proper set of transformations for these other PSMs. While this is a great marketing pitch for MDA and the PIM it is just not that straightforward. A PSM has too much platform-specific knowledge buried in it to simply move between different technologies. After all the PSM is where the business logic that makes the application unique actually resides. In order to make this move all that logic must be changed to fit into the new target technology.
Finally, and probably most significantly, MDA must overcome the grass roots resistance to the idea. Developers like to develop. They don't like to have control taken from them. There is a fundamental distrust of code generation and a resistance to this type of abstraction.
There are a couple of moves afoot that make me think we might be on the verge of a change in perception about MDA. The first is a more pragmatic approach being taken by vendors. Instead of expecting developers to program in pictures, many vendors are taking a more pragmatic approach. Developers are expected to build more familiar UML class diagrams and annotate them. Few are expecting a full blown executable model.
Second and more significantly is the emergence of meta-data as a normal part of every day life for Java developers. Several years ago the XDoclet project started bringing meta-data into the mainstream. The 'killer-app' for XDoclet was that EJBs only needed the bean class, the rest of the required files (remote/local interfaces, deployment descriptor entries, value objects etc.) were updated/generated automatically by XDoclet. Many developers embraced this approach because of the reduced tedious work that had to be done. With XDoclet, developers no longer have to mess with keeping the remote and local interfaces in-sync with the implementation methods. Instead XDoclet automatically generates the remote and local interfaces.
At this point many MDA vendors and proponents should be saying to themselves, hey that is exactly what we have been doing for years! And it is, the difference is no visual model. The developers write the meta-data that would normally be in stereotypes and/or tagged values right into their code. For many this bridges a semantic gap that is missing in the visual modeling paradigm.
Back to the meta-data being more 'normal'. The other major change that has recently happened that brings meta-data front and center is the addition of Annotations to the Java SE 5 platform and especially the use of this meta-data in Java EE 5. Developers will be using meta-data on a daily basis.
Another thing that developers typically don't like about the MDA approach is the feeling of lack of control over what is generated. I have often heard the assertion that the developer could do better than the code generator and other such comments. While it is probably true that a hand-crafted piece of code would be 'better' in many respects, it is also true that the generated code can be done in a fraction of the time and is 'good enough'.
An area where developers have been resistant to adopt a meta-data driven approach in the past has been persistence. The same argument of 'I could do better' was used quite often. More recently though it seems that Object Relational Mapping frameworks like Hibernate and/or Cayenne have been gaining momentum. On the surface you might be thinking that I'm nuts to draw a comparison between R/O Mapping and MDA but the comparison is not that far off. Most MDA tools rely on code generation instead of a framework but basically it's the same kind of thing. Hibernate has a framework but could just as well generate code at run time (or imagine aspects being attached to your POJOs). Either way (framework or code generation) meta-data is driving the way objects are mapped to rows in tables.
With the current set of R/O mapping tools a lot of control is removed from the developer; what exact SQL is executed is no longer in the developers direct control. However many are willing to give up this control for the increased productivity gain allowed by using something like Hibernate. Who really wants to write all that JDBC code anyway?
So where does this leave us? Will MDA take its hoped -for place as the next level of abstraction for developers? Will MDA become the next best thing that is relegated to the dustbin of history? Hard to say for sure, one thing is for certain though, meta-data is becoming more a part of developers everyday lives.
Reader Feedback: Page 1 of 1
Joe Gaber commented on 15 Oct 2005
Here are comments related to snippets of your article:
1. "Developers like to develop" - this is true; however, developers have developed using a wide variety of programming languages and OCL (instrumental to the fulfillment of MDA) is another programming language (in fact its similar to the much aclaimed language smalltalk), and in the same way that Java didn't become a big deal until Java 2, OCL and UML (now at 2.0) are likely to now gain the same acceptance. Also, see my blog for a way for developers and architects to work in pairs in a version of Agile Modeling that I am professing is the missing link between modeling and programming collaboration.
2. "There is a fundamental distrust of code generation and a resistance to this type of abstraction" - isn't any 3rd GL (i.e., Java) an abstraction, or two, from 0s and 1s?? And, doesn't the entire J2EE array of APIs provide even more abstraction from code writting?? And, doesn't every IDE on the market today provide all types of functionality that helps write and refactor code?? Conclusion: If it wasn't for increasing abstractions from the 0s and 1s a CPU uses, we would be producing the same amount of 0s and 1s today as 30 years ago. The fact that we (developers) produce vastly greater amounts of machine code through the "abstract" languages and tools of today then we did before is what produces "productivity". At the point productivity ceases to increase, programming (wirtting code) becomes a commodity given to the lowest bidder.
3. "The developers write the meta-data that would normally be in stereotypes and/or tagged values right into their code. For many this bridges a semantic gap that is missing in the visual modeling paradigm" - whether you write meta-data in the code or in a model it only matters from a business standpoint not an engineering standpoint. What I mean by this is that business models far outlive the applications that fulfill the business's objective. Modeling the business domain, its processes, and transforming that into code provides the business with a much longer lived artifact than code. You can use XDoclet, Java 5 annotation, or an external transformation/mapping file (as with MDA), it doesn't matter, the fact is you are still using the meta-data to generate specific code. Also, as far as the idea of a "visual modeling paradigm", once you add the rich semantics into the visual elements of the model, you know have much more than pictures. You have a programmically rich artifact with much more power than just written code.
4. "Another thing that developers typically don't like about the MDA approach is the feeling of lack of control over what is generated" - in the case of a MDA tool like the open-source Andromda, what is generated is exactly what you specify in the templates, metafades, and specific cartridge descripter files used. All of which is under the complete control of whoever the busines decides, including developers. I am currently writting a cartridge for Andromda to generate specific applications using the Sprng Framework, including Spring's MVC implementation as well as to include DWR(AJAX) integrated with Spring. There is no restrictions to the way I decide for the code to be generated as I am the one creating the templates that produce the code.
The arguements about how MDA, CASE tools, CORBA, Meta-data, etc have not been embraced in the past is an indication of the future of MDA is, IMO, absurd. In order for MDA to succeed, there has had to be, and continues to be, numerous different technologies and methodologies to converge. MDA is in its infancy in terms of being a practical approach to software development. The fact is that MDA is highly dependent upon tools, and quite frankly, no tool of the past has had the power, functionality, vision, etc to truly meet the needs of MDA. That is changing as we speak, with virtually every major tool vendor, and the two leading OS IDEs (Eclipse and Netbeans), introducing new products, or projects, which include UML modeling, OCL, BPM, and MDA functionality all wrapped up into a compete high productivity tool.
Subscribe to the World's Most Powerful Newsletters
As DevOps methodologies expand their reach across the enterprise, organizations face the daunting ch...
Mar. 22, 2018 10:30 PM EDT Reads: 1,227
The standardization of container runtimes and images has sparked the creation of an almost overwhelm...
Mar. 22, 2018 10:15 PM EDT Reads: 1,771
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As au...
Mar. 22, 2018 07:00 PM EDT Reads: 1,456
DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held Novemb...
Mar. 22, 2018 01:45 PM EDT Reads: 4,390
With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO an...
Mar. 22, 2018 01:30 PM EDT Reads: 1,934
DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, ...
Mar. 22, 2018 12:15 PM EDT Reads: 5,950
DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing w...
Mar. 22, 2018 11:30 AM EDT Reads: 2,278
@DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held Novem...
Mar. 22, 2018 11:00 AM EDT Reads: 1,501
DXWorldEXPO LLC announced today that Dez Blanchfield joined the faculty of CloudEXPO's "10-Year Anni...
Mar. 22, 2018 08:45 AM EDT Reads: 1,319
"We started a Master of Science in business analytics - that's the hot topic. We serve the business ...
Mar. 22, 2018 07:30 AM EDT Reads: 3,781
The best way to leverage your Cloud Expo presence as a sponsor and exhibitor is to plan your news an...
Mar. 21, 2018 02:30 PM EDT Reads: 1,990
As you move to the cloud, your network should be efficient, secure, and easy to manage. An enterpris...
Mar. 21, 2018 12:00 PM EDT Reads: 3,237
There is a huge demand for responsive, real-time mobile and web experiences, but current architectur...
Mar. 21, 2018 02:15 AM EDT Reads: 3,502
DXWorldEXPO LLC announced today that "Miami Blockchain Event by FinTechEXPO" has announced that its ...
Mar. 20, 2018 12:30 PM EDT Reads: 2,721
Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will ...
Mar. 20, 2018 12:15 PM EDT Reads: 7,104
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to ...
Mar. 20, 2018 07:45 AM EDT Reads: 4,450
"NetApp is known as a data management leader but we do a lot more than just data management on-prem ...
Mar. 19, 2018 04:00 PM EDT Reads: 3,535
We call it DevOps but much of the time there’s a lot more discussion about the needs and concerns of...
Mar. 18, 2018 09:30 PM EDT Reads: 7,999
The dynamic nature of the cloud means that change is a constant when it comes to modern cloud-based ...
Mar. 18, 2018 09:15 AM EDT Reads: 3,418
"Since we launched LinuxONE we learned a lot from our customers. More than anything what they respon...
Mar. 17, 2018 04:00 PM EDT Reads: 3,828