[stringtemplate-interest] accept simple expression language
Johan Stuyts
j.stuyts at javathinker.com
Wed May 13 00:26:43 PDT 2009
> what about a non-web email html letter scenario. I'd have a batch Java
> program reading user uploaded
> ST templates and produce html newsletter. I am talking about a
> scenario that
> this function is needed done via ST. I know it is 1% of common scenarios
> but when it is needed,
> some kind of template solution has to be provided and I hope the ST
> would fill this 1% gap
> somehow, perhaps a subclass or special object creation option to relax
> the rule a little.
Why can't the user upload a transformation script besides the template?
That should be easy to explain to and manageable by the user. It might
even be easier for users because they can focus on the two tasks (data
preparation and rendering) separately instead of in a single file.
And like I said, a transformation script will always be more powerful than
anything you build into a template. Suppose you start with extending
StringTemplate with simple arithmetic expressions. It probably satisfies
99% of the users, but then someone needs other functions so you have to
extend StringTemplate again. And so on. If you give them a powerful
transformation language then you are done.
Regards,
Johan
More information about the stringtemplate-interest
mailing list