A co-worker of mine is very interested in combining Agile methods with Model-Driven Engineering. He feels that the benefits of agility and of model-driven code-generation show tremendous promise as a breakhrough combination in productivity and quality and he is stymied that there aren't a lot more folks out there trying to do it.
He attended UML World in June 2005 and had some discussions with Scott Ambler (AgileModeling), Steve Mellor (co-creator of the Schlaer-Mellor OOAD method, and co-author of "Agile MDA", Executable UML and MDA Distilled), and Jon Kern, Agile MDA Evangelist (who helped Peter Coad launch TogetherSoft). He found most of what they had to say supported the possible synergy between Agility and MDA, but was very surprised to see AMDD folks and XP/Scrum folks throwing away their models once they had the code for it.
Upon hearing the above, I noted that Peter Coad is quite possibly the missing link between MDE and Agility:
- Coad created the agile method known as Feature Driven Development (FDD) as well as the field of "Color Modeling" with UML.
- Like MDE and MDA, FDD is very focused on domain-modeling, and using the model (rather than the code) as the primary form of "capture" for communicating knowledge about the system. [See my article "FDD is Football-Driven Development (and XP is Rugby)" for an explanation.]
- The TogetherSoft tool-suite was allegedly tailor-made to be an "Agile IDE" of sorts to facilitate doing FDD and Color Modeling.
- Full/pure MDA strives for 100% generation of all code and executables directly from the models.
- Ambler's AMDD, and "domain modeling" espoused by the likes of Robert Martin, Martin Fowler, and others in the XP community strives for "minimal, meaningful models", where they model only as needed, as a means of gaining more understanding, and then embed the knowledge gained into the code and/or tests.
Furthermore, doing so would remove a lot of the manual parts and practices of FDD that many consider to be the least "Agile". And much of the FDD "Color Modeling" patterns and techniques are very much the equivalent of refactoring and design-patterns that are currently used for code. See the end of this message for some more resources on Color Modeling.
In my own humble opinion, I think the "sweet spot" is somewhere in between 100% code generation and "hand-crafted" code. I realize that 100% is the ideal, but I'm thinking about the 80/20 rule here, and whether trying to eliminate that last 20% is perhaps not always practical.
I think the biggest barrier to doing that today is tools:
- The modeling tools are good at handling the structure, but not as much as the behavior.
- High-level programming languages like Java and C# and their IDEs are more convenient for specifying behavior (which is still largely textual in UML 2 and Action-Syntax Languages).
- It is extremely difficult to maintain the non-interface code for a "class" or "package" unless it is either 100% manually coded or else 100% auto-generated. If it is 50-50, or even 80-20, then the "nirvana" of seamless and reversible round-trip design to code and back just isn't quite there yet.
The Eclipse framework shows a lot of promise in helping us get to that point, and has a lot of the groundwork and building blocks already in place, but still has a lot more work to be done.
I hear some of you saying, "Okay Brad, I see what this has to do with Agility. But what does this have to do with CM?" Well, in my January 2005 Agile SCM column, among other "crystal-ball gazing" predictions, I talked a little about "Model-Driven CM" and how it would resurrect the once popular SCM research-area of Software/System Configuration Modeling:
- MDE/MDA would readily lend itself to allowing the developer to focus on the logical structure of the code, letting the physical structure (files and directories) be dictated by the code-generation tool with some configuration scripting+profiles.
- This in turn would allow models and modeling to be easily used to analyze and design the physical structure of the code, including build & configuration dependencies.
Some other resources related to Agility and MDE:
- Anyone going to EclipseCon2006 to see Agile Application Development with Eclipse and Pragmatic MDA
- Hans Wegener's Agility in Model-Driven Software Development? Implications for Organization, Process & Architecture
- Andreas Voelter's Patterns for Incremental/Iterative MDD
- Martin Fowler's Language Workbenches and MDA
- IEEE Software Oct 2003 Point/Counterpoint" on MDA -vs- MDD
- Jorn Bettin, on the Practicalities of Implementing CBD and MDA and where Agile fits in the picture
- Dion Hinchcliffe's Domain-Driven Design: MDD Done Right?
- Alan Cameron Wills' Agile Components - Scaling XP
- A 2004 Workshop on Graph rewriting for Model refactoring in MDE/MDA, sponsored in part by:
- Scientific Research Network on Foundations of Software Evolution
- A Formal foundation for Software Refactoring
- Architectural Resources for the Restructuring and Integration of Business Applications (ARRIBA)
- Research Center on Structural Software Improvement
- The Program-Transformation.org Wiki-Web and Homepage
- And lastly, Jeff Sutherland writes of Charles Simonyi's latest effort, Intentional Software:
"Simonyi’s vision, and the reason he started his company, is to take the idea of models and go one step further: to link the model and the programming so tightly that they eventually become the same. Programmers and users will be able to switch between many contrasting views of the model they are creating, and revise programs at will simply by tweaking the models (see “Just-in-Time Programming,” below). It’s something like an architect being able to draw a blueprint that has the magical property of building the structure it depicts—and even, should the blueprint be amended, rebuilding the structure anew."