Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > General thoughts needed on web page templates/FreeMarker/Velocity/XSLT

Reply
Thread Tools

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

 
 
Chris
Guest
Posts: n/a
 
      04-07-2006
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.



 
Reply With Quote
 
 
 
 
Oliver Wong
Guest
Posts: n/a
 
      04-15-2006

"Chris" <anon> wrote in message
news:44369a97$0$25024$(E-Mail Removed) m...
>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.


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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
General....very general.... no important for u forever hi Python 0 03-18-2009 08:21 AM
general thoughts RJB MCDST 0 12-23-2007 10:44 PM
How create a general class from System.Web.UI.Page? =?Utf-8?B?UGFzcXVhbGU=?= ASP .Net 6 05-05-2007 11:54 AM
Looking for thoughts and opinions on Ruport, and reporting in Ruby in general. Gregory Brown Ruby 20 04-29-2007 11:48 PM
Re: Web page is not available - "The Web page you requested is not available offline. To view this page, click Connect" Natty Gur ASP .Net 0 06-06-2004 05:46 AM



Advertisments