Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

General thoughts needed on web page templates/FreeMarker/Velocity/XSLT

Thread view: 
Chris - 07 Apr 2006 18:14 GMT
I distribute an app that uses JSP. Users edit the JSP to customize it for
their environment. At the moment, we just call plain Java objects within the
JSP, but users get confused when they have to work around the Java snippets.
So we've got the classic how-to-separate-code-from-presentation problem.

We could use Velocity or FreeMarker to insert dynamic data into easy-to-edit
html templates. Most of our competitors, though, output XML and then have
the users do CSS or XSLT to generate the actual html.

Does anyone have insights on what the easiest approach is for your average
user? I have no experience with XSLT, but it strikes me as much harder to
handle than a FreeMarker-style template. On the other hand, XML is really
convenient in lots of situations.

Also, does anyone have insight into performance issues? Some of our
customers have really, really heavy traffic (many, many page views per
second), so page generation speed matters. My gut says that server-side XSLT
transformation has a lot of overhead, but I have no data to back this up.
Oliver Wong - 15 Apr 2006 18:51 GMT
>I distribute an app that uses JSP. Users edit the JSP to customize it for
>their environment. At the moment, we just call plain Java objects within
[quoted text clipped - 10 lines]
> handle than a FreeMarker-style template. On the other hand, XML is really
> convenient in lots of situations.

   In my experience, you'll encounter a lot of people who are really
talented at web design (e.g. XHTML and CSS), but know almost nothing about
anything else (this includes XML, XSLT, Java, etc.) For these people I
recommend the template solution, as it's as close to XHTML that they're used
to as possible.

   What you could do, if some of your clients want to "take advantage of
XML", is to use both XML and templates. That is, your product outputs the
dynamic content into an XML file. The clients can do whatever they want with
this XML file, including passing it to your bundled templating system. Your
templating system allows the web designer to write mostly XHTML, with some
slots for where the dynamic data should appear. Your templating engine
gathers this dynamic data from the XML file.

> Also, does anyone have insight into performance issues?

   I don't. Why don't you try some benchmarking?

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.