Erik Jõgi wrote:
Rickard Öberg wrote
...
2) Great performance
3) Templates does not have to be in files (JSP files do)
...

where does the performance win over JSPs come from? As JSPs are compiled into servlets, how do you beat that?

Don't know, don't care. It's just faster :-) That's probably not inherent though; it may very well be that it is possible to make a JSP compiler that creates equally fast output. However, since JSP's are converted into classes you will run into memory management problems on sites with many pages, as the JSP-servlet-classes are tougher to cache than AST's for Velocity templates.


if you don't put your templates into separate files, then where do you
put them? and how do you specify in xwork.xml which one to pick as the
view?

Typically we have a template file with a default, but in a number of cases we allow it to be edited by the end-customer. The edited version is stored in a database, along with all the other content. The Velocity is therefore a part of a customized Portlet configuration. It just happens to be a very rendering-related configuration option.


We also very often use Velocity for non-HTML cases, such as generating emails. It's nice to be able to have one way to generate all dynamic text, whether it's HTML or emails, and which customers can edit without having to call us.

/Rickard




------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id56&alloc_id438&op=click _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to