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 to pure Java rendering used by toolkits like the default JSF JSP tags 2. Yet another template engine and expression language to learn if you use 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

Nathan Bubna wrote:
If you don't want to learn anything new, why stop in the middle at
JXP?  Just use java itself.  Then there's no new syntax (we'll ignore
the fact that java syntax is still evolving...) and no new API (again
ignoring the fact that those change too) that can often take longer to
grok than a new syntax.

Sarcasm, aside, lines 2 thru 5 of the example script at
(http://jxp.sourceforge.net) are the new, non-java, not-quite-jsp
syntax of JXP.  Don't kid yourself.  There is both new syntax and new
API here.  It may be minimal, but it's there.  It has to be,
otherwise, it's just an incomplete java interpreter with some new APIs
built in.  You might as well use something with more momentum and
support, like Groovy.

The syntax of template languages like Velocity or Freemarker is
intentionally designed to be simple and quick to learn.  Yeah, things
like try-catch or synchronized blocks would probably involve a lot of
complexity in such new template languages were they even possible, but
there's good reasons for making such things difficult/impossible in a
templating language.  Also, the lack of an EL in JXP may simplify the
syntax, but at the cost of a lot more keystrokes.  There's a reason
JSP, Velocity, Freemarker, and friends all have those.

On 10/17/06, Mike B <[EMAIL PROTECTED]> wrote:
Hi Guys,

I am simply responding because we have been using JXP for about 7 months now..

We are currently using JXP for our web component templates. It has worked out fairly well. We actually started out using FreeMarker, but did not like the idea of learning a new syntax just for simple templating. Sure... its not that big of a deal, but what is the value add of learning additional syntax to do something you could do in Java (even easier).

We also felt that JXP was easier to work with front to back. We were up and running in a couple of hours. Its nice to have the ability to write Java code in your templates. We never have much, but for the small sections that need it, it comes in handy.

It would be great to see some others take interest in the project. I feel the over all benefits of having a popular and well supported template engine that has a JSP like syntax is a no-brainer.

Some key reasons:

    - You get mainstream tool support for free.
    - You get a template engine with a familiar syntax
- It makes for easy migration of JSP artifacts to templates (which are no longer bound to a JSP/Servlet container).


Just some 3rd party thoughts.....

Cheers,
Struts Action 2 / WW User
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=46468&messageID=94261#94261


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to