[TYPO3-dev] Moving the topic of the discussion a little bit -- Based of thread "Change roadmap..."
Dimitri Tarassenko
mitka at mitka.us
Tue Apr 11 23:05:05 CEST 2006
Michael,
On 4/11/06, Michael Scharkow <mscharkow at gmx.net> wrote:
> I did check out smarty and about a gazillion other templating classes
> for various languages in the past. While I agree that smarty is very
> neat, I agree with
> http://www.massassi.com/php/articles/template_engines/ that even this is
> overkill if we have php available anyway which is just built for templating.
I agree with the article in general. However, in practice Smarty has
one great effect that I noticed myself: the fact that full range of
PHP functions is NOT available within the template actually enforces
the business logic/presentation separation that is advocated in the
article. Otherwise, it's sometimes TOO tempting to just call a couple
of functions in the template when you really need to handle it in
business objects. Sounds familiar? ;).
One other important issue is that I am not afraid to let site users
(who are not PHP developers) edit Smarty templates, but I probably
would never let them edit something that is going to be executed
as-is.
These are 2 reasons I think Smarty does make sense. I remember I had
exactly the same reservations as the author ("why the hell do we need
another syntax processor?":).
I do agree that the templates should stay as PHP, whether as-is or as
a result of Smarty compile, because we are leveraging the power of
accelerators (Zend optimizer, etc.).
I do remember Dan's thread, and I kind of agree. Especially after I
tried creating a theme for WordPress and suddenly something that takes
FOREVER to do in TYPO is so easy because it's PHP;) (I know WordPress
is a different animal, I know;))).
--
Dimitri Tarassenko
More information about the TYPO3-dev
mailing list