|
Sponsored Links
Resources
Enterprise Java Research Library
Get Java white papers, product information, case studies and webcasts
|
News
News
News
|
Messages: 4
Messages: 4
Messages: 4
Printer friendly
Printer friendly
Printer friendly
Post reply
Post reply
Post reply
XML
XML
XML
|
 |
MDA with Eclipse : Acceleo 2.0.0 generates JEE applications
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" generates:- Book.java DTO
- BookDAO.java
- ProjectDAOFactory.java
- BookDAOImpl.java
- book.hbm.xml
- dao.properties
- project-ddl.sql
- project-constraints.sql
- hibernate.config.xml
A "Welcome" screen will produce: - Welcome.jsp
- WelcomeAction
- WelcomeForm
- tiles-def.xml
- struts-config.xml
- validator.xml
- web.xml
- context.xml
- Welcome.css
- Welcome.js
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.
The screencasts 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?
|
|
Message #235067
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: MDA with Eclipse : Acceleo 2.0.0 generates JEE applications
Congratulations.
Though I am a bit surprised you use class diagrams to describe screen navigation. Wouldn't activity diagrams be more appropriate? Are you trying to stay compatible with modellers that only produce class diagrams maybe?
Still, I am personally in favour of MDA-type approaches, so I welcome your addition.
Kit
|
|
Message #235073
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Acceleo versus Andromda
Some users comming from AndroMDA to Acceleo reported the differences between Acceleo and AndroMDA, the pros for Acceleo were the following:
- The template syntax easier to read and maintain than velocity.
- Full Eclipse integration ( but it seems andromda plan to provide this) with editors and generation preview.
- Acceleo supports any kind of EMF-based metamodel, that means UML but also specific paradigm one may define, XML files using XSD. Acceleo is also able to convert models coming from the MDR world.
- An open community for generator modules trying to provide many kind of generators : Php, JEE, Java, .Net, Python..
Here comes the topics being pros or cons depending on people vision. - Incremental generation with user-code, andromda generates interfaces and abstract classes in a specific directory (target) and only update this code, the implementations are generated once in "src".
The vision of both tools are quite different too, Andromda use models enhanced with a lot of technical informations (using tag values and stereotypes) to customize the generation process, Acceleo's vision is about keeping models abstracts, customizing the generation trough the properties/chain files and providing technical information through the implementation completion.
On the cons side :
- Eclipse integration, right now Acceleo need Eclipse to run, Andromda don't. This can be a pitfall for people not using Eclipse.
- Andromda is older and as such provides more complete catridges. For instance Spring integration is not done yet in the Acceleo JEE module.
|
|
Message #235122
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Andromda could use Acceleo !
I think another difference is "what is the goal of the projects ?"
AndroMDA want to create some packaging cartridges, with one specific methodology and some hard-coded technical choices.
Acceleo is a generic engine, to create specifics generators. Acceleo has been to create to simplify this creation (to industrialise some architectural choices).
AndroMDA may use Acceleo as one of its engines. Acceleo may propose some AndroMDA generators in its modules repository.
|
|
 |
New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com |
 |
 |
Reza Rahman continues to explore the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6.
(January 21, Article)
Ted Neward is an independent consultant specializing in high-scale enterprise systems, and an authority in Java and .NET technologies. He is the author and co-author of several books, including Effective Enterprise Java. At TheServerSide Java Symposium in March, he will be presenting sessions on pragmatic architecture, ECMAScript and Scala.
(January 15, Article)
Now that Oracle is absorbing Sun Microsystems, there mixed views on what should come of the Java Community Process (JCP). While some say Oracle should become the new steward of Java and keep the JCP much as it was, others argue that it may be time to open-source this widespread language.
(November 24, Article)
Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6.
(November 2, Article)
SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options.
(September 28, Article)
Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team.
(September 22, Article)
Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies.
(July 14, Article)
JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags.
(June 29, Article)
In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project.
(June 23, Tech Talk)
Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now.
(June 15, Tech Talk)
In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements.
(June 15, Tech Talk)
In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls.
(June 4, Tech Talk)
Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable.
(May 28, Tech Talk)
This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work.
(May 26, Tech Talk)
Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers.
(May 21, Tech Talk)
Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application.
(May 19, Article)
Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)
The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)
|
|