[stringtemplate-interest] Conditional statements

David Moshal dmoshal at gmail.com
Sat May 6 13:15:02 PDT 2006


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.

So, in the case of formatting, wouldn't it be helpful if the template had
some
evaluative capabilities that go beyond boolean evaluation??

Dave



On 5/6/06, Kay Roepke <kroepke at dolphin-services.de> wrote:
>
>
> On 6. May 2006, at 21:51 Uhr, David Moshal wrote:
>
> > I've always thought that extreme MVC separation isn't the goal, but
> > rather
> > that each element of the
> > M,V and C, should contain elements of all three, with particular
> > emphasis on
> > one.
>
> I don't think so either, at least that was the impression I got from
> Ter's postings.
> But the problem currently is to get expression handling into ST,
> mainly because of time issues,
> even if it is "only" boolean expressions. (And at that it should
> stop, too, IMHO).
>
> > Indeed, this is currently the case with ST, which supports $if$
> > anyway (a
> > 'C').
> > And the template itself is persistent, so it is a Model for the View.
>
> Yeah, that happens to me all the time, too ;) Seeing MVC everwhere.
> It starts to get creepy once you
> see colleagues that way...
>
> > My ZAR 0.02.
>
> :)
>
> -k
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org:8080/pipermail/stringtemplate-interest/attachments/20060506/ef40d6e9/attachment.html


More information about the stringtemplate-interest mailing list