Re[2]: [SMARTY] To who's right is right??
| From: | Bertrand DUNOGIER | Date: | Fri, 14 Jun 2002 08:37:59 +0000 |
| Subject: | Re[2]: [SMARTY] To who's right is right?? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4891@lists.php.net to get a copy of this message | ||
RM> I'd say that the overall principle for using Smarty or any other
RM> template engine is "keep it simple"...
Hmmm, why do you want every template engine to have the same overall
principle ?
RM> i.e. keep functionality in the PHP scripts and use a minimum of
RM> functions and control statements in your templates. This should
RM> keep dependencies between the scripts and the templates at a
RM> minimum, and make room for easy changes.
I don't agree, or not completely. Some sites require none or few
control structures in templates, while other sites require big
scripting in the templates. I always try to ask myself if i need an
instruction in my script, or if it would fit better in the template.
In my opinion, simpler does not mean better for a template engine. I
have developped a complete e-commerce site (http://www.unaprog.fr)
using FastTemplate, which is in my opinion a "simple" engine, and the
backend code grew very complex because of the lack of control
structures / functions inside the templates.
RM> In a previous project i worked on for a major danish newspaper i
RM> witnessed the result of cluttering templates (Perl templates) with
RM> to much functionality - a monster of a setup, where nobody really
RM> knew what was going on.
I agree, Smarty should not grow TOO complex. Do you think that it's
too complex at the moment ? The plugin architecture is in my opinion
perfect, since it allows to develop as much new features as you want
without any overload for the script since new features are only loaded
on demand...
What i overall like in Smarty is that it is a "developper oriented"
template engine. As a developper, i can really develop an application
in a professionnal way, completely separating backend and frontend.
This is just my point of vue :)
Bertrand