MultiPurpose Code Generator Jenerator Released

Discussions

News: MultiPurpose Code Generator Jenerator Released

  1. MultiPurpose Code Generator Jenerator Released (9 messages)

    The Jenerator Version is a code generator (Licensed under the Academic Free License version 1.1), which takes meta information from different mediums, applies XSL templates and generates code. It supports regeneration i.e. incremental development. It generates source for EJB's (CMP and BMP), Unit Tests for EJB, GOF and J2EE patterns.

    Check out JGenerator.

    More info (from the project)
    ----------------------------
    The Jenerator Version 0.9 is a code generator (Licensed under the Academic Free License version 1.1) and hosted on SourceForge , which takes meta information from different mediums, applies XSL templates and generates code. Unlike other code generators, which use JavaDoc custom tags to define and describe what is to be generated, Jenerator uses XML based Descriptor files. In some cases it even generates the Jenerator Descriptor file for you. For example in case of Entity Beans the Jenerator fetches the meta information from the Database and converts the meta information into a Jenerator Descriptor file, which the developer can customize or use it as it is with default configuration. In case of Session Beans, Pattern generation etc … the developer has to make the Jenerator descriptor file manually. For generating EJB's the Jenerator Descriptor grammar is very much similar to the EJB deployment descriptor i.e. ejb-jar.xml. Therefore to learn configuring the Jenerator descriptor the learning curve is greatly minimized. Moreover one needs to just do all the configurations outside the code, in a single descriptor file - one each for EJB, pattern and presentation layer code generation.

    The Jenerator supports incremental generation i.e. it retains the code, which you have manually added after the first generation when you regenerate the code. Therefore it enables the developer to regenerate as many times as he wants but still retain the code which has been manually added. Since it is XSL template based the source code which is generated can be customized as per ones need with very little XSL knowledge. See the Overview and UserGuide for details


    FEATURES:-

    · It generates code of various types. It also supports regeneration.

    · The Jenerator currently generates the following types of code. :-

    + Enterprise Java Beans (Generates Remote, Local and Home Interfaces, Bean classes for Ejb Specification 1.1 and 2.0 - with some limitations see TO DO below)
    - Entity Beans (CMP and BMP - Implements full BMP code)
    - Value Object for Entity Beans
    - Session Beans (Stateless and Stateful)
    - Message Driven Beans
    - EJB Deployment Descriptor

    + Unit Tests for all types of EJB for JUnit and Cactus
    + ANT's build file for the generated code
    + JDO source and descriptor (Limited Support)
    + Servlets
    + GOF Design Patterns
    + J2EE Design patterns

    Go get it at http://www.visioncodified.com.
  2. Can u tell me how much code "intervention" is needed by a programmer on the generated code. I have seen some code generators before, most of them suck in terms of formating, variables names and the generated code has to be changed to a great extent.
    Some more details with a small example will be great. I kno i can download the software, configure it, run it blah blah blah.. but given that market is flooded with these things, I would like to hear from u
    thanks
  3. Hi,
    Most of the generators which are available in the market, they generate code based on some hardcoded templates. The Jenerator generates code based on XSL which you can modify as per your need.
    The Jenerator first gets the meta information from the database and generates the Jenerator Descirptor file (Which is very similar to the ejb-jar.xml file) here you can choose not to edit the file and use it as it is or customize it as per your needs, for example if you want to change the name of a column "accountbalance" to "accountBalance" i.e. with the B capital you can do that as per Java coding guidelines. You can decide whether you want Value objects or not if yes with setters or not. Which Unit testing framework you will be using. For which verion of EJB specs you want to generate code .... so and so forth.
    For generating the Entity beans ....ZERO intervention is required for generating code. The Jenerator will generate CMP and full BMP code for you, for Session beans and Message Driven Beans it will generate skelelton code with the ejb descriptor, for Unit tests the getting of EJB from the Naming service and instantiating code will be generated ... the test cases will have to be written, but the generator will retain the manual code during regeneration.
    For Patterns and servlets most of the code will be generated you will have to only concentrate on the Business logic

    See the documentation at httpP://www.visioncodified.com or write to me at siddhartha at visioncodified dot com for further details.

    Siddhartha P. Chandurkar
    siddhartha@visioncodified.com
  4. sounds good. we heard about a lot of code generators so far. each has similarities and differences. i personally want to know what really people expect from a code generator.
    lets have a little survey here to understand what developers want. how true do you think the following statements are..

    1. it is ok for a code generator to generate code that depends on codegenerator specific or third party, non-standard api (except for the core APIs like j2ee, struts)
    2. nice GUI is important.
    3. we should be able to edit the templates.
    4. generator should support most popular template languages like XSL and velocity.
    5. we should be able to add new templates besides editing.
    6. it should support plugable codegeneration modules (including templates) and these modules should be easily shared with other people.
    7. it has to integrate with most popular IDEs.
    8. UML support (for example through XMI) is a must.
    9. xdoclet kind of stuff is good enough.
    10. it has to be open source and/or free.

    which ones are more important for you?

    i think we need more comprehensive tools and happy to see that people are trying. better tools are still to come. what do you say?

    -talip
  5. I agree with your comments.
      When java started initially Sun never bothered to come out with a standard - nice GUI editor for java developers. That was stupid on Sun's part.
       Then other vendors saw this as an chance to make some money and they literally copied the interface of Microsoft Visual Basic. Same set of menus, options, environments etc .. And now the market is flooded with java editors. Its too overwhelming.
      Most of the requirements you mentioned are fulfilled by Eclipse, forte, Togethersoft , may be visual slick edit. None of them is perfect and most of them need code intervention. So do you think it is worth spending time to come out with one more and think it will cover all requirements ..
      I m not disagreeing with anyone here, just want to know what do the people behind these IDE tools think and whats the return ??
  6. i think someone will figure out to combine all the good features in one code generator. i hope it will come out soon.

    I didn't mean that i agree with the 10 statements i listed above. i actually thing that some of them are not true. for example statement #1 is not true.

    by the way, being able to choose your favorite IDE or tool is good. i am not in favor of having only one standard ide from sun or anyone else. competetion is good for quality. having more option to choose from is good. we need different type of IDEs and code generator (kind of) tools for different purposes. everyone has a different taste. if everyone talks about their likes-and-dislikes then we may come up with a common (not 100%) definition of good tools (such as code generators).

    -talip
  7. I am glad that you came out with a wish list.
    I will try to answer one question at a time

    1. it is ok for a code generator to generate code that depends on codegenerator specific or third party, non-standard api (except for the core APIs like j2ee, struts)

    Ans: The Jenerator itself dosent generate the code it just converts the meta information form diffrenet mediums into one format i.e. the Jenerator Descriptor file and then applies XSL templates to generated code. So you can very well replace the XSL template by your own template. Though i must admit that the User Guide is not so comprehensive to explain you how it is possible. A couple of days more and that information will be there.

    2. nice GUI is important.
    Ans: The first thing on my TODO list on my site is the GUI. Which be like a wizard. I have already started working on it ... It will be definitely in the 1.0 release. I am looking for some GUI experts since i am not so good at it. If anybody is interested please contact me at siddhartha at visioncodified dot com

    3. we should be able to edit the templates.
    Ans: You can very well edit the templates and the Jenerator Descriptor file. This is one of the USP(Unique Selling Point) of the Jenerator that you have full control over genration

    4. generator should support most popular template languages like XSL and velocity.
    Ans:The jenerator is based on XSL

    5. we should be able to add new templates besides editing.
    Ans: You can definitely add your own templates, just take care that the name of the templates should be same

    6. it should support plugable codegeneration modules (including templates) and these modules should be easily shared with other people.
    It supports that, you can add your own templates. Since it is based on Strategy Pattern You can easily add your own modules.

    7. it has to integrate with most popular IDEs.
    Yeah thats one of the TODO's i would really appreaciate some help, since i was the only person it was difficult to put it in the BETA release. It will be definitely part of 1.0 release
    8. UML support (for example through XMI) is a must.
    Yeah thats again one of the TODO's i would really appreaciate some help, since i was the only person it was difficult to put it in the BETA release. It will be definitely part of 1.0 release

    9. xdoclet kind of stuff is good enough.
    I didnt get your question. But consider that the you dont have to learn new JavaDoc comments and it supports regeneration. Apart from EJB code regeneration. It generates JDO, GOF and J2EE patterns, servlets and Unit Tests based on two frameworks i.e. JUnit and Apache's Cactus

    10. it has to be open source and/or free.
    Ans: It is Open Source License Under the Academic Free License Version 1.1


    Siddhartha P. Chandurkar
    siddhartha@visioncodified.com
  8. And also regeneration which i forgot in my last message. In my point of view Regeneration is very important. Often the Database or the UML Model based on which you generate code changes. If one has added manual code after the first one shot generation, one would not like to lose that code. The Jenerator restores the manual code.
    The vision of Jenerator is to have a single case tool which generates code based on diffenet on information from different mediums i.e. Modelling tool, Databse, IDL's, source etc... generate code and unit tests -> compile the code and run the unit tests and deploy it on the App Server you want and regenerateA.
    So that incremental development is possible.

    Siddhartha P. Chandurkar
    siddhartha@visioncodified.com
  9. I think those are very good questions. I have answered them for our code generator, iQgen, at
    http://iqgen.innoq.org/10questions.html.

    Stefan
  10. I've tried a LOT of code generators and I actually think this one is most promising due to a clever, pragmatic approach. The choice of JSP over callbacks in regular Java classes is a bit weird, but it's not a show stopper.

    I like the code-retaining roundtrip ability and full control over the transformation result (since the man in the middle is Java.)

    The single most important feature for me, however, is the excellent exposure of the UML model. ANT integration is superb too.

    NICE WORK, innoQ!