aspose file tools*
The moose likes Servlets and the fly likes xmlc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "xmlc" Watch "xmlc" New topic
Author

xmlc

Giselle Dazzi
Ranch Hand

Joined: Apr 20, 2003
Posts: 168
Hi everyone,
Have you guys used xmlc ? Im starting to take a look at it and Im trying to understand if/how I can use it instead of my JSP but keeping my servlets...


Giselle Dazzi<br />SCJP 1.4
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
Hi Giselle,
I have used xmlc for a couple of years now and to tell you the truth I am not impressed.
The concept of it seems pretty cool, a unique way of separating data from presentation etc, but in reality unless you are serving up very simple HTML, things become complex very quickly. It also does not scale well and suffers from performance issues.
For those who don't know what xmlc is:
- code up HTML with HTML 4.0 "id" attributes
- compile the HTML using the xmlc compiler into a Java class, the ids, become static members of the class
- from a servlet you then instantiate the above class and use DOM manipulation to produce the dynamic HTML (adding/removing nodes etc)
- and then essensially perform an out.println(document.toString())
So my advice would be to avoid it and stick with servlets/jsps/taglibs, or even go down the servlets/xml/xslt route.

James.
Giselle Dazzi
Ranch Hand

Joined: Apr 20, 2003
Posts: 168
Thanks James, I had a feeeling I was going to hear that.
Unfortunatelly, I was told to prepare this demo that today uses jsps/servlets on xmlc.
So I have to do kind of a migration.
Hope I got this right:
1) Transform my jps on pure htmls
2) compile them with xmlc
3) create servlets for whatever functionalities I had on my jsps
4) call them from the .java files my compilation produced ?
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
Yep that's pretty much the steps:
here's a simple xmlc example:
- it should compile assuming you have your environment setup (xmlc jars etc)
- also assuming you know how to invoke the xmlc compiler
the html

the servlet

James.
[ November 11, 2003: Message edited by: James Swan ]
Giselle Dazzi
Ranch Hand

Joined: Apr 20, 2003
Posts: 168
Thanks, I´┐Żll work on it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: xmlc
 
Similar Threads
NX: Is there a SCJD mental breakdown support group?
java.lang.StackOverflowError
commons FileUpload.
question about Velocity or WebMacro usage
Anyone from Chennai, taken SCJP 1.4 recently