You are here: Re: [PHP] Re: Template style question « PHP « IT news, forums, messages
Re: [PHP] Re: Template style question

Posted by Robert Cummings on 11/06/05 16:22

On Sun, 2005-11-06 at 05:11, Petr Smith wrote:
> Smarty sucks. Mixing presentation and logic is never good idea. I know
> Smarty is very popular, but big popularity doesn't always mean quality.
>
> Back to original question: If you decided to reinvent the wheel, please
> don't reinvent square wheel without tire.
>
> Mixing presentation and logic is bad. You should have no sqls, loops,
> ifs or any other logic things in templates. Templates should be editable
> by any stupid guy, anyone who knows just css/html. No sql, no php, no
> other language.

While I'm not a particularly great fan of Smarty myself (preferring pull
versus push systems), I don't think that support for conditionals and
loops within a templating system is a bad thing provided that such loops
and conditionals are restricted to use for presentation logic only.

To create a template system that only resembles HTML/CSS I think would
put an extraneous burden on the developer since they are the one that
would have to define/manage the unrolling of iterative data in such a
way as to make it invisible to the template designer.

Additionally, there's no way it could be entirely like CSS/HTML since at
some point you need to place markers for the content to be expanded, and
no matter how you slice the problem, those markers aren't going to be
HTML. They might be HTMLish (a la XML) but they won't be HTML.

Cheers,
Rob.
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация