--------------------------
Well, I was too quick on the key presses, so here goes again. Sorry for
the spam :)
--------------------------
"Brought to you by the maniac that brings you ANTLR!"
A while ago I was investigating different templating languages, and I
came across one called StringTemplate [1]
Of particular interest is the author's paper, "Enforcing Model-View
Separation in Template Engines" [2]. Please read it. It's interesting.
I don't consider myself a template or grammar/language parsing expert,
but this guy seems to have put a ton of thought into what makes a good
templating engine. Specifically, his work seems grounded in some pretty
solid language parsing theory.
Another reason would be because of JXTemplateGenerator. This generator
is arguably one of the most popular combos to use with the "Power Trio"
model of Cocoon development. Unfortunately, the JXTG seemed to be a
"one-man-show", and since that one man is gone, the likelihood of the
generator getting "proper" maintenance decreases significantly. The code
is also huge and scary (at least to me ;) ).
Additionally, the dual syntax for accessing things through JXPath and
JEXL expressions has led to people, including myself, being confused as
to when to use each syntax. Seeing the mixed syntax is even worse. IMO
we need a *single*, easy-to-use syntax for this.
Therefore, I suggest that Cocoon needs a better, simple, minimalistic
templating system that's not the JXTemplateGenerator.
Another good thing: StringTemplate is BSD license.
Of course, this is a "do-ocracy," but I lack some of the finer knowledge
to "do" a StringTemplate generator.
Do we need a new, (standardized?) or possibly even *gasp* better
templating system for Cocoon? This is where I encourage people to dive
in and give their own [RT]s and thoughts on the issue.
Regards,
Tony
[1] http://www.stringtemplate.org/
[2] http://www.cs.usfca.edu/~parrt/papers/mvc.templates.pdf
|