[Catalyst] Re: template comparison (was: why not mason
A. Pagaltzis
pagaltzis at gmx.de
Wed Nov 1 16:17:40 GMT 2006
* Perrin Harkins <perrin at elem.com> [2006-10-28 06:05]:
> A. Pagaltzis wrote:
> >TT2 provides a single minilanguage for both, which is
> >unnecessarily powerful and verbose for the 18% and way
> >underpowered for the 2%.
>
> You're only supposed to use the TT language for simple things.
> Hairy things are supposed to be encapsulated in plugins,
> written in Perl.
That makes a certain amount of sense; I say a certain amount,
because I’m not sure what case it makes for TT2:
1. Some bits of hairy display logic really are specific to the
particular template they’re in, so putting them in a plugin
just pointlessly moves apart related bits of code.
2. Sometimes there are still large blocks of static strings
interspersed with such logic, so it’s more of a sub-template
task than a plugin task.
3. If you’re going to bail out to the Perl layer for complex
stuff (which you should), you might as well pick something
with a more concise markup generation syntax than TT2’s for
the simple stuff. (I admit TT2 fares decently when producing
plain text formats – but I’ve never had to do that.)
Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>
More information about the Catalyst
mailing list