Eugene

authors : Arnaud THIMEL
contact : thimel@codelutin.com
revision : $Revision$
date : $Date$

Project origin

Eugene was born after a research of an easy-to-use code generator oriented on "in memory" models. But the research ended by a failure.

Analyzed projects were :

  • Jostraca ;

  • EMF ;

  • ...

Code Generation were chosen instead of Introspection because it allows to use the compilation processes and therefore to validate the generated code. Even if the initial need was to generate Java source code, Eugene is able to generate any type of code.

Technical part

Eugene allows using a set of generators. These generators are abstract of any specificity enabling to adapt them to individual needs.

By default, Eugene has two implementations of these generators :

  • ObjectModelGenerator (generation from an object model) ;

  • UIModelGenerator (generation from a graphic model).

Each of these models has its own specificities due to its structure and working mode...

Anyway, these generators are useless without generation templates. Templates are files allowing to determinate what will be the generated content according to the initial model. Thanks to NuitonProcessor, these templates are written with a syntax close to the JSP syntax mixing Java and generated code. The goal of LutinProcessor is to transform the templates by replacing JSP code by the matching Java code. Obtained Java classes can be compiled and so become independents.