[thelist] PHP Templating recommendations

John williams thudfactor at gmail.com
Wed Feb 2 14:52:46 CST 2005

Matt, your defense of Smarty and explanation of the tradeoffs between
maintainability, readability, and code support is very well done --
but misplaced. The original question was about what could be used for
"smarty lite" for a small application program that did not need the
power (or, indeed, the complexity).  For when Smarty would be "like a
sledgehammer for a thumbtack," I think was the original phrasing.

Smarty is a non-trivial amount of code (~4000 lines) and requires some
server infrastructure as well. If the program I'm writing *is*
trivial, then tacking on Smarty (and PEAR::HTML_QuickForm) could
easily double, triple, quadruple! the codebase and add server
configuration requirements. And really, if all I'm doing with Smarty
is {$var} or {if $var}{else}{if} then what gains do I get from Smarty?
Most of the functionality of the class I don't need or want for such a
miniscule project -- so why use it?

> Certainly, we all have our preferences, but they ought to be based
> upon a solid understanding of the choices.

Yes, indeed! And my preference is generally for Smarty. But not when
my code is going to be shorter than the package itself.

More information about the thelist mailing list