UML2 to JEE : Struts/Spring/Hibernate

UML2 to JEE generates Java/JEE code and files from a stereotyped UML2 model. The generated software has a layered architecture:

  • User Interface
  • Data Transfert Objects
  • Data Access Layer

Event

L'Acceleo JEE Sprint 2008 is coming ! more information on the dedicated page !

Demonstrations

The next showcase describe the use of the JEE module and Topcased to generate a JEE data access layer

Complete documentation can be found on the Acceleo's wiki. Consult it first if you encounter problems. Don't hesitate to contribute !!

Technical target overview

Struts

Struts is an Apache framework allowing a real distinction between the user interface and the business logic of a JEE software. It's known as the Model-View-Controller pattern (MVC). Struts is broadly used but appears to be quite difficult to setup, and keeping consistency between screens and actions through the XML files quickly become a challenge.

Struts may be used with Ajax in order to provide Web 2.0 applications

Struts is available at the following url : http://struts.apache.org

Hibernate

Hibernate is a JEE framework handling the Object/Relational mapping. Using Hibernate one may persists Object data in a relational database.

Hibernate is available at: http://www.hibernate.org

Modeling

The generator produce code from UML2.1 models enhanced with a few stereotypes.

You may use different modelers with this generator : Topcased, Papyrus or the UML2 Tools Eclipse project.









Features

The generator use Hibernate best practives in order to provide a better productivity and great performances.
About persistency:

Easy browsing on business objects

  • subclassing
  • 1-1, 1-*, *-* associations
  • unidirectional and bidirectional navigability
  • optimisations
  • Use of POJOs

Relational Mapping

  • Cache handling on persisted data
  • 3NF SQL
  • integrity constraints
  • concurrence accesses
  • technical id

Data Access Layer

  • no dependency between DTOs and Hibernate
  • advanced search methods
  • transaction handling
  • JUnit tests





About the application cinematic:

MVC2 Architecture

  • Struts forms and actions
  • navigation between screens
  • consistency between Java, XML files and specifications

Externalized navigation

  • screen transitions locking
  • Struts actions and forms settings
  • Tiles templates
  • Slicing in functionnal scenarios
  • Tomcat settings
  • Forms validation

Pages template handling

  • web files (jsp, css 2)
  • use of standards taglibs
  • functionnal tests (HTMLUnit)
  • quick prototyping
  • event-based AJAX























Planning

Module status
Business objects

100%

Data Access layer

100%

Hibernate mapping

100%

MVC Architecture

100%

Navigation

100%

Pages templates

100%

Forms enhancements

55%

Internationalization

0%

Installation

The installation process is described on the installing a module web page. .

Contribute!

If you want to change or complete the generative templates you may use the a Team Project Set file. Using this file you'll be able to import the module sources right from the Subversion repository inside your Eclipse.

Team Project Set file for JEE module

The getting and modifying generator module sources page explains how to use this file.