On 10/18/06, Don Brown <[EMAIL PROTECTED]> wrote:
I'm wondering if we shouldn't go in new direction to improve the
tags....  Looking at the freemarker templates, the ratio of Freemarker
code to HTML is probably 1.5, which leads me to wonder why we are using
a template language at all.

There is also a lot of repetition in the expression language
statements that we ue. I'd guess that 80% of the time we are just
testing whether a parameter exists. In the xhtml directory, the
largest tag is checkbox.

* 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/checkbox.ftl?view=markup

Virtually every line is conditional on a parameter and includes other
logical tests.

Some of the smaller tags, like form, do nothing but include other tags

* 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/xhtml/form.ftl?view=markup

So, yes, I think it would be interesting to look at what we are
actually doing with the templates and reduce that to a "little API"
that could be more efficient and easier to maintain.

I think one acceptance test should be whether it becomes easier for
people like Mark Menard to adapt the tags and themes to their own
layouts. :)

-Ted.

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

Reply via email to