With recent interest in XML standards and availability of tools supporting these standards, it has become possible to generate multiple types of documents by applying XML document transformation technology. A new whitepaper on the subject has been posted on TheServerSide.com.
The excellent whitepaper is presented in PDF format due to it's length:
http://www.theserverside.com/resources/article.jsp?l=XMLCodeGen.
-
Code Generation Using XML Based Document Transformation (10 messages)
- Posted by: Floyd Marinescu
- Posted on: November 21 2001 17:02 EST
Threaded Messages (10)
- Code Generation Using XML Based Document Transformation by Thomas Christensen on November 21 2001 17:24 EST
- Code Generation Using XML Based Document Transformation by Hai Hoang on November 21 2001 19:29 EST
- Code Generation Using XML Based Document Transformation by Dmitri Colebatch on November 22 2001 01:58 EST
- Code Generation Using XML Based Document Transformation by Jesper Pedersen on November 22 2001 11:35 EST
- Code Generation Using XML Based Document Transformation by James Hr on November 22 2001 21:10 EST
- Code Generation Using XML Based Document Transformation by Carlo Luib-Finetti on November 23 2001 03:11 EST
- Code Generation Using XML Based Document Transformation by Stefan Siprell on November 23 2001 04:31 EST
- Code Generation Using XML Based Document Transformation by Thierry Janaudy on November 23 2001 05:28 EST
- Code Generation Using XML Based Document Transformation by Hai Hoang on November 23 2001 10:17 EST
- Code Generation Using XML Based Document Transformation by Stefan Siprell on November 23 2001 04:31 EST
- Invalid article PDF link by Dag Blakstad on November 23 2001 04:27 EST
-
Code Generation Using XML Based Document Transformation[ Go to top ]
- Posted by: Thomas Christensen
- Posted on: November 21 2001 17:24 EST
- in response to Floyd Marinescu
Hi
Does anyone know if the EJB generator they developed is available anywhere?
Cheers
Thomas -
Code Generation Using XML Based Document Transformation[ Go to top ]
- Posted by: Hai Hoang
- Posted on: November 21 2001 19:29 EST
- in response to Thomas Christensen
Check out the EJBX Code Generator.
EJBX is a Java based EJB 2.0 CMP Entity Bean Code Generator. The EJBX can provide a fast development toolkit for developer to generate Enterprise JavaBean 2.0 object based on the existing database, just by a couple simple commands. This is to reduce unnecessary typo error and human mistake to generate EJB code to run on any EJB 2.0 CMP compliant servers. Following is what EJBX generates:
1. EJB 2.0 CMP entity beans (Remote and Local interface, Remote and Local home interface, and the Entity Bean)
2. ejb-jar.xml Deployment Descriptor for any J2EE application servers that support EJB 2.0 CMP Entity Bean
3. Deployment Descriptors for WebLogic 6.1 (weblogic-cmp-rdbms-jar.xml and weblogic-ejb-jar.xml)
4. Primary key classes for entity bean with multiple primary key fields
5. Value objects, Session facades, and Business delegates classes for all entity beans
8. Struts Action, Form, jsp classes for all entity beans
9. In addtion, ejbx also generates ApplicationResource.properties and struts-config.xml files and much more
To see an example of the code generated by EJBX please go to http://www.myhtg.com/examples.zip.
-
Code Generation Using XML Based Document Transformation[ Go to top ]
- Posted by: Dmitri Colebatch
- Posted on: November 22 2001 01:58 EST
- in response to Thomas Christensen
XDoclet is another option for you - generates remote/local/home/local-home interfaces and deployment descriptors based on @comments in your code.
http://sourceforge.net/projects/xdoclet
hth
dim -
Code Generation Using XML Based Document Transformation[ Go to top ]
- Posted by: Jesper Pedersen
- Posted on: November 22 2001 11:35 EST
- in response to Thomas Christensen
I find some of the ideas presented quite interesting -- I'll have to look into this.
You can try our tool EJBCreator -- it is also based on a XML format (http://opensource.itplus.dk/EJBCreator/).
EJBCreator is licensed under GPL.
-
Code Generation Using XML Based Document Transformation[ Go to top ]
- Posted by: James Hr
- Posted on: November 22 2001 21:10 EST
- in response to Thomas Christensen
Thomas,
We have an evolving generator technology built around a J2EE framework. Other frameworks will evolve too. Our technology generates server-side and client-side documents (ie end-to-end). You describe the data, business rules, and presentation in XML and it generates EJB Entity/Session and client-side XML/XSLT or JSP solutions. Security, session mgmt, menu processing, and content processing ... all automated. JSP Model 2 style presentation design.
The generation is template-based and change/test cycles are quick due to XML/template dependency maps and the build process (Ant with custom tasks). Change any source XML, template, or manually authored Java results in automatic re-compile and deployment to your test BEA environment (ie NO manual shuffling of files, not even EJB deployment stuff).
Our technology supports pure XSLT generation, but since that's limiting our product also offers and promotes a Java template technology.
Any further inquiries welcome.
jameshr@forelogic.com -
Code Generation Using XML Based Document Transformation[ Go to top ]
- Posted by: Carlo Luib-Finetti
- Posted on: November 23 2001 03:11 EST
- in response to Floyd Marinescu
Can somebody explain to me why all this xml + xsl-code with their hairy syntax should be more comfortable and more productive than doing this strait in java?
Ok, i see, if you have a lot of simular things like these enum examples, you'd better do with a code generator instead of copy-pasting from one source to another. But for the more interesting stuff, i doubt that you are faster with this xsl hacking. -
Code Generation Using XML Based Document Transformation[ Go to top ]
- Posted by: Stefan Siprell
- Posted on: November 23 2001 04:31 EST
- in response to Carlo Luib-Finetti
Well my two cents....
We're using the struts Framework for our webapp. The central apsect of using this framework, are the so called FormBeans. Each HTML-form is mapped to a JavaBean which has to have a getXXX-setXXX Method for every HTML-Field. Currently we have multi page forms consisting of up to 50 fields!
Developing a bean with 100 Methods is quite cumbersome....
So we wrote a little app, which creates a Java Class for the Bean otu of a XML-Document.
All we have to describe in XML Document is some base stuff for the class (Classname, SuperClass, etc), and all the reuired properties and their type (String, Integer, etc.). The programm creates a get and set Method for each property, and creates "real" toString, equals, and hashcode Methods.
It took us about two hours wo write the app, and now it takes us five minutes flat, to create a bean with 50 properties!
One more thing, before I quit. We wanted to use an existing Bean Generator. But none of them met our needs. They all either created EJB Code, or GUI Beans, with way to much overhead (passivate Methods, changeEventProperties, etc).
Is there any other solution out there, that makes "simple beans?"
with best regards
Stefan -
Code Generation Using XML Based Document Transformation[ Go to top ]
- Posted by: Thierry Janaudy
- Posted on: November 23 2001 05:28 EST
- in response to Stefan Siprell
Check EJBGen as well:
(Main target Weblogic Server)
http://beust.com/ejbgen/
I wrote an article that introduces EJBGen:
http://www.jyperion.org/j2ee/ejbgen/article.htm
Thierry Janaudy
-
Code Generation Using XML Based Document Transformation[ Go to top ]
- Posted by: Hai Hoang
- Posted on: November 23 2001 10:17 EST
- in response to Stefan Siprell
Stefan,
What you just describled is what EJBX does and more. Not only EJBX can generates the Form with validation for you, it also generates action classes, struts-config.xml, applicationResources.properties, jsp pages, and whole EJB related back-end stuff (see comment above).
Unlike other code generators, which based on reflection, EJBX uses jdbc API to read the database information to create the EJBX input template for you so you don't have to type as much.
-
Invalid article PDF link[ Go to top ]
- Posted by: Dag Blakstad
- Posted on: November 23 2001 04:27 EST
- in response to Floyd Marinescu
Hi!
Looks like TSS itself could use code generation techniques to avoid publishing invalid links.
The correct link to the PDF is
http://www.theserverside.com/resources/articles/XMLCodeGen/xmltransform.pdf
Best Regards,
Dag Blakstad