[stringtemplate-interest] Conditional statements

David Moshal dmoshal at gmail.com
Sun May 7 09:52:03 PDT 2006


Thanks Ter - I'll take a look asap.
I totally accept that I'm currently not using the full capabilities of ST.

Dave


On 5/6/06, Terence Parr <parrt at cs.usfca.edu> wrote:
>
>
> On May 6, 2006, at 1:15 PM, David Moshal wrote:
>
> > Kay - let me play Devil's advocate here a bit.
> >
> > Take the issue of Formatting of dates and numbers. This is a case
> > of applying
> > an expression to the model, to create a particular view of the data.
> >
> > With ST currently if one wants to create, a table by iterating
> > through a collection of objects,
> > in which the cells need to be formatted in a particular way, those
> > objects need to provide the formatted
> > 'view' of the model, so either one creates custom objects in the
> > controller, applying the formatting rules
> > to the model, or one alters the model object, so that it knows how
> > to format it's data for the view.
>
> please see my elegant solution to this problem w/o breaking the
> sanctity of MVC separation (better solution than turing complete
> templates I might add):
>
> http://www.cs.usfca.edu/~parrt/papers/i18n.pdf
>
> > So, in the case of formatting, wouldn't it be helpful if the
> > template had some
> > evaluative capabilities that go beyond boolean evaluation??
>
> I submit that it is unnecessary and worse just make ST an "me too"
> engine; nothing special.  ;)
>
> Ter
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20060507/a982ba4a/attachment.html


More information about the stringtemplate-interest mailing list