Model Driven Engineering refers to the systematic use of models as primary engineering artifacts throughout the engineering lifecycle, the set of tools needed to apply such an approach is made of graphical modelers (UML), interoperability layers (XML/XMI imports and exports) and tools to take advantage of this models using "Model to Text" transformations.
IT companies used to buy expensive proprietary solutions for these needs, thanks to the Eclipse project and some high quality free software plugins one may now have a full featured IDE with modeling support.
Acceleo is one of these tools, the latest release brings open-source generator modules for many technologies (JEE, Php, CSharp, Python...) These modules are by a team of architects
trying to provide state of the art
code architecture using well-tried framework and best practices. The JEE generator is directly inspired by the Sun blueprints with Struts and Hibernate. Spring support is on its way and should be integrated for the next release.
The Eclipse ecosystem is now providing nice open-source UML modelers such as Topcased
. Using this modeler one is able to design a sofware system using Class diagrams.
These diagrams may be annotated using Stereotypes
in order to add semantic information. Basically two main stereotypes are used on UML classes :
- Screen : mean this class is a screen, each association going from a screen to another meaning I'm able to navigate from this screen to this other screen.
- Entity : mean this class is a business object that should be persisted.
As many technologies trying to avoid strong coupling, JEE tends to be quite verbose. Using a MDA approach one can greatly improve its productivity and its software consistency generating files. As an example an Entity "Book
- Book.java DTO
" screen will produce:
Changing a screen, adding for instance an association to another screen, will cause the update of the struts-config.xml and associated files.
Note the fact that as soon as an entity or a screen is designed and the corresponding code has been generated you're able to deploy the software on application servers. This capability is useful for quick prototyping, encouraging exchanges with the final customer.
describes the use of the module: modeling, generating, adding a new business entity and a new screen and then generating again the whole architecture without loosing the previous customizations.
Other features for the JEE module are described on the JEE module official web page
This pragmatic vision is enforced by an efficient tooling: writing generation templates is made easy thanks to a simple syntax and full-featured editors (highlighting, error detections and completion). This set of tool has been validated with success on real-world projects
Acceleo is not just a template language and provides behavior to keep user code. That means once you've generated your software and you complete the source code, this so-called "user code" won't be lost when you re-generate information.
Emphasizing the Eclipse integration, it provides a seamless use of the MDA approach for the developers.
"Ready to use" bundles
are available providing Acceleo, the set of JEE, CSharp, Php and other modules, and an UML2 modeler.
Thanks to many projects Eclipse is now providing a full set of modeling tools, do you use or plan to use them? Have you tried to apply a model driven approach on any project?