[thelist] PHP Templating recommendations

Matt Warden mwarden at gmail.com
Wed Feb 2 15:51:56 CST 2005


On Wed, 2 Feb 2005 15:52:46 -0500, John williams <thudfactor at gmail.com> wrote:
> 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.

Point taken. But, as I said in my last email, there are a lot of cases
out there where Smarty would be appropriate and beneficial, but
developers excuse ignoring it by saying that it is 'like a
sledgehammer for a thumbtack' or other such phrases, when what they
really mean is that they are afraid to learn a new syntax (which is
ridiculously trivial). I am not saying it applies here.

> 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. 

I didn't have to change any server configuration. It's just a couple
included files. Your codebase argument is valid, though.

> 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?

If that's all you're doing, why are you using PHP?

Matt Warden
Miami University
Oxford, OH, USA

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list