Re: Anybody have any thoughts on Smarty?

From: Date: Thu, 20 Mar 2003 13:40:48 +0000
Subject: Re: Anybody have any thoughts on Smarty?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-140426@lists.php.net to get a copy of this message
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" <ckline@rightcode.net> wrote in message news:2A06B0FE-5A31-11D7-9AFD-000393CDCA6A@rightcode.net... > 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 >

« previous php.general (#140426) next »