Example module

Generation module ready to test

This module can be used to easily test source code generation and template edition.

This module was intentionally created to be really simple and used to discover the power of Acceleo's features. It is not designed to cover any need and is only meant to be a proof of concept.


Composition

This module is made of templates for a simple J2EE architecture :
  • JDBC (data access)
  • DTO (object transfer)
  • Servlet / JSP / Tomcat configuration (Web GUI management)

These templates are based on an UML2 metamodel. This kind of model can be exported to XMI/EMF 2.0 (.uml2 extension file) and is directly editable in the Acceleo environment. If you want to see it graphically, use a compatible modeler as RSM (Rational Software Modeler), an IBM software, available for evaluation.
The generation module may work with others modelers and others versions of XMI/UML, but some adaptations may be required.

Execution environment

In order to facilitate the generation module tests, an example of a target project is included inside the download file. This example includes the customization files (not generated), an exported model representing a Blog, and the .chain file to launch the generation.

This project requires WTP 1.0 to work.

If you want to create this project from scratch, you just have to use the WTP wizard in order to create a dynamic web project, and then the Acceleo wizard to create a .chain file.


Sample module for Acceleo 1.1.0 and Eclipse 3.2
Simple J2EE example module and test project.
Status
Platform Download
All sample-module-1.1 (size:1.3M)
 
Sample module for Acceleo 1.0.1 and Eclipse 3.1
Simple J2EE example module and test project.
Status
Platform Download
All sample-module-1.0.1 (size:1.3M)

Instructions

The quickstart tutorial gives more complete instructions in order to test this sample.

  1. Unzip the downloaded file in your workspace
  2. Launch eclipse and import the 2 projects
  3. Open the file free.demo.weblog/model/WebLog_en.uml2 to see the input model
  4. Right Click on WebLog.chain, then Launch
  5. Check that the source code has been properly generated in the src and in the WebContent folders
  6. Right Click on the free.demo.weblog project then Run...
  7. Tomcat gets launched along with the browser that can be used to test the generated application

To give a real business behaviour to the application, you just have to add user code.