File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes xmlc Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: xmlc
 
Similar Threads
Anyone from Chennai, taken SCJP 1.4 recently
java.lang.StackOverflowError
NX: Is there a SCJD mental breakdown support group?
commons FileUpload.
question about Velocity or WebMacro usage