> I think perhaps we are getting too deep into the > "solution" when we > don't understand or agree upon the problem. The > purpose of the Struts > tags is to provide a shortcut to create simple and > complex output. The > tags are usable in Velocity, Freemarker, and JSP. It > does this by > delegating to an independent component object model > that defines the > component as a Java object and uses Freemarker to do > the actual rendering. > > Therefore, the advantages of the current system are: > 1. Same tags in Velocity, Freemarker, and JSP > 2. Easy to customize a tag's output by overriding its > Freemarker template > > However, I do believe there are disadvantages: > 1. Performance overhead of the Freemarker template > engine, as opposed > o pure Java rendering used by toolkits like the > default JSF JSP tags > 2. Yet another template engine and expression > language to learn if you > se JSP or Velocity > 3. Little to no tool support for Freemarker > Furthermore, if you look at our templates, most of > them have little HTML > output themselves, making them harder to read as they > have more > Freemarker syntax than HTML. Template engines > generally do better when > the markup greatly outweighs the template syntax. > > The above disadvantages are big enough to me that I'm > interested in > finding an alternative to Freemarker. I want > something fast, intuitive, > and requires little to no extra learning on the part > of the developer. > Freemarker seems like a great template language for > general purpose web > pages, but for our tags, I'd like to find something > lighterweight. > > I don't have a solution myself, but as we discuss > possible solutions, > and I'm very happy we have an active discussion > going, please keep in > mind the problems we are trying to solve. > > Don > [snip]
Just a few notes: the 'bloat' on the freemarker templates for the tags are caused by the text trimming statements to make the output look good - that is, without all the whitespace - if we could get freemarker to collapse the whitespace, we might be able to drop these altogether. Of course, there are places where not might be possible. Another thing to note is that some tag templates use jsp tags (<@s.iterator />), which could be replaced by the faster equivalent in freemarker. I'm just saying that there might be some places where some optimization is possible. That's why I reacted on performance problem - if it indeed were faster and easier to learn (although I don't really think that's an issue for freemarker - excellent manual and very easy to learn), then yes, let's switch, because that's indeed the major problem. But if not, why would you switch freemarker for an even less 'accepted/matured' alternative (bad choice of words, but you catch my drift, I hope). As for the tool support, I saw the demo from the new freemarker eclipse plugin a couple of months ago, which looked pretty good. I doubt there is any tool support for JXP, unless you're talking about syntax coloring of some sort. Cheers, Phil --------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=46468&messageID=94474#94474 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]