0 Replies Latest reply on Feb 27, 2002 1:09 PM by François Wolff

    Announcing Ejen, a new code generation system (using Java/XM

    François Wolff Newbie

      Please visit http://ejen.sourceforge.net for detailed informations, demonstrations and downloads.

      Introduction
      ------------

      The Ejen program is a text generation system ("text" means, including, but not limited to, source code in any kind of programming language). It makes use of Java/XML/XSLT technologies and is implemented for now as an "Ant task" (http://jakarta.apache.org/ant). This implementation allows the setup of a complete generation, compilation and deployment sequence, by maintaining only one "build" file that indicates the order in which each of these actions must be achieved.

      Generally speaking, this system should be understood as a system that organizes a data flow, whose initial source is an XML file containing a (minimal) set of data (required by the generation process). The data flow grows by the fusion with other XML files and by going through XSL "filters", until it is sufficiently detailed. It finally goes through XSL "templates" to produce the resulting text files.

      Ejen is not therefore by itself a code generator. It is rather a system based on Java/XML/XSLT technologies that makes the actual creation of code generators easier and faster.

      EJB 1.1 demonstration
      ---------------------

      For demonstration purposes, a complete EJB 1.1 generation process (with test JSP files) has been written for the JBoss/Tomcat server (using the HSQLDB database). This demonstration produces the entire set of Java source and XML files required by an Entity Beans (of "bean managed" type) deployment : the primary key classes, the home and remote interfaces, the complete implementation of the beans and the ejb-jar.xml deployment descriptor file. Basic JSP files, for testing purposes, are also generated in order to manage the EJB from an internet browser : database column creation/modification/destruction is managed this way, just as basic finding methods.

      This demonstration has the following special feature : home and remote interfaces are deduced from a syntactical analysis of the generated bean. This feature allows the use of the generator not only to create the first EJB implementation, but also to synchronize (update) the dependent interfaces from a manual bean modification (for example, after the addition of a new and specific "findBy" method). As this system is open and flexible, this feature could be also used in order to synchronize other dependent classes (like client classes that encapsulate EJB calls).

      Free use
      --------

      The Ejen program may be freely used for non-commercial developments. Commercial use is strictly forbidden without the express permission of the author (see the complete license).