Smarty is a fantastic tool.

One of it's really great features (compared with a couple of other
templating engines that I have looked at) is the inherent ability to include
logic (using smary syntax) in the templates. This'll sound a bit odd - after
all, a point of templates is to separate logic and presentation. However, it
is really handy to be able to include 'presentation logic' in the
presentation layer. For example, contained in a template a very simple eg
in pseudo terms:

if form validated then
    show success message
else
    show failure message

>From your code you pass this template the form validated variable value and
it shows the appropriate message. Without the ability to do this (as in
other
templating engines) you find that your logic code becomes cluttered with
presentation issues. Hence Smarty facilitates a much cleaner separation of
logic and presentation.

However, this does mean that either your page designer has to get to grips
with introducing smarty code into his/her templates or you must add such
code to his/her templates. Though for the reason above (and others) it is
well
worth giving it a try.

David



"Charles Kline" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Was reading this and it sounds really cool. I do work as a consultant
> to designers and thought this may be a good way to improve work flow? I
> have read mixed thoughts on this, but was wondering what this list
> thought? Anyone using it? Real world?
>
> http://www.zend.com/zend/tut/tutorial-cezar.php
>
> Thanks,
> Charles
>





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to