Re: Using templates (Code & User Interface)
| From: | rush | Date: | Sun, 25 Jan 2004 12:06:04 +0000 |
| Subject: | Re: Using templates (Code & User Interface) | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175677@lists.php.net to get a copy of this message | ||
"Robert Cummings" <robert@interjinn.com> wrote in message
news:1074969489.28484.9.camel@blobule.suds...
> A common misconception is that templates provide complete separation
> from logic, this is untrue. Template frameworks (the best ones) provide
> separation of business logic from presentation logic. So using an "if"
> statement inside a template is completely normal if it pertains to the
> display logic.
My opinon on that is that template system role is to separate presentation
logic from the html which can be considered as resource. Therefore I do not
prefer template systems with embeded control structures in it. But I guess
it is a matter of ones own preferences, and what is "right approach" for
them it is not necessary right for me and other way around.
I completely agree that it is also necessary to separate bussines logic from
the presentation, but I do not think this is a job of template system.
rush
--
http://www.templatetamer.com/