[stringtemplate-interest] Limited control flow with
stringtemplate - by design?
Laurent Vaucher
blo.b at infonie.fr
Mon Nov 14 22:17:14 PST 2005
>
> <if(number==SOMETHING)>blah<else>etc<endif>
>
> Is this possible? I'd rather use integral constants/enumerations
> rather
> than booleans...
This is BAD!!! Oh, I'm not taking a religious or philosophical
position, just repeating what I have read from the 'academic'
article about StringTemplate (http://www.cs.usfca.edu/~parrt/papers/
mvc.templates.pdf). One of the goals of the library is to enforce
strict model-view separation by voluntarily making the template
language non-Turing-complete. You're not supposed to compute things
that the model part did not make explicitly available to the view
part. You might like it or not, but that's the way of StringTemplate.
Being a (not yet completely desintoxicated) JSP addict and using a
lot of Java inside pages, I can understand the initial frustration.
Laurent.
More information about the stringtemplate-interest
mailing list