In this interview, I discuss Model-Driven Architecture, or MDA, with Andrius Strazdauskas, R&D Manager, Gary Duncanson, President and CEO, and Daniel Brookshier, Chief Architect of No Magic. Prior to this interview my understanding was that MDA was an attempt to program in pictures or diagrams, and I was skeptical. My impression was that MDA proponents were claiming that you could do a high-level design, and push a button to generate the code, without worrying about all those little details that pop up when you actually do code by hand.
However, as I spoke with No Magic, I kept recognizing in their MDA tool many of the same characteristics that we built into our "little languages" and code generators in Artima's web architecture. It turns out the goal of MDA (or No Magic's incarnation of MDA at least) is to just generate code for repetitive tasks that are a good fit for automating, leaving developers to focus their code-writing efforts on those parts of the application that are not as easy to automate. Here are a few relevant quotes:
Daniel Brookshier: I think the key thing about MDA, Model Driven Architecture, is the model represents the code, and the code is produced. It's generated. So I model all of my entities. I say what's going to be the business objects in my system, and the model is annotated, and then code is produced from that model. I don't really have a disconnect between the code and model, because the model always generates the code.
In the case of things like Spring and Hibernate, I can go from a model to Spring and Hibernate and out to the web tier with Struts, and I've done all that with just model. There's maybe a few places where I put in a little bit of code, but it's minor. It's glue code. Very little has to be done in that teir. Most of the code is in the model. Press a button, produce it every time. So I'm only editing the model. I don't edit code.
Gary Duncanson: The model becomes the code.
...Daniel Brookshier: I guess the key thing about MDA is we're not trying to replace the developer. What we're trying to do is make the developers job a lot easier by taking out all the busy work.
|Andrius Strazdauskas, R&D Manager, Gary Duncanson, President and CEO, and Daniel Brookshier, Chief Architect of No Magic, Inc.. discuss Model-Driven Architecture. (10 minutes, 52 seconds)|
What is your opinion of Model-Driven Architecture and the technique of code generation in general? In what ways have you used MDA or code generation in the past that has, or has not, worked out well?Post your opinion in the discussion forum.
Bill Venners is president of Artima, Inc. He is author of the book, Inside the Java Virtual Machine, a programmer-oriented survey of the Java platform's architecture and internals. His popular columns in JavaWorld magazine covered Java internals, object-oriented design, and Jini. Bill has been active in the Jini Community since its inception. He led the Jini Community's ServiceUI project, whose ServiceUI API became the de facto standard way to associate user interfaces to Jini services. Bill also serves as an elected member of the Jini Community's initial Technical Oversight Committee (TOC), and in this role helped to define the governance process for the community.
Frank Sommers is Editor-in-Chief of Artima Developer. He also serves as chief editor of the IEEE Technical Committee on Scalable Computing's newsletter, and is an elected member of the Jini Community's Technical Advisory Committee. Prior to joining Artima, Frank wrote the Jiniology and Web services columns for JavaWorld.