[stringtemplate-interest] String manipulations

Terence Parr parrt at cs.usfca.edu
Sat Sep 2 14:06:18 PDT 2006


On Aug 30, 2006, at 11:42 PM, Emond Papegaaij wrote:
> Maybe it is an idea to look at the functions that are available in  
> XSLT and
> add similar functionality to StringTemplate? You could see them as
> predefined templates, and perhaps even allow a developer to add his  
> own
> functions (such as Xalan Java extensions). I think functions like  
> these
> will allow a more clean separation between model and view, because the
> model no longer needs to perform transformations that are actually  
> part of
> the view. There is however a risk of introducing too much power, which
> allows a developer to put logic in the view. However I do think  
> that if
> the functions remain fairly simple (and don't have side-effects)  
> this risk
> is fairly small.

I agree.  There should be a standard library of common web related  
transformations that come with StringTemplate so that there is no  
danger of a programmer opening up a huge hole to his model just to  
get these things. if they come with the application there is no way  
that they could be considered part of the developer's model even if  
they are computations.

Ter




More information about the stringtemplate-interest mailing list