Re: About Smarty 2.0
| From: | Luc Saint-Elie | Date: | Thu, 07 Mar 2002 14:48:34 +0000 |
| Subject: | Re: About Smarty 2.0 | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2969@lists.php.net to get a copy of this message | ||
Hello (hello Arnaud)
I don't fully agree (or I don't really understand, as I don't have a team experience with Smarty)
I don't see why a designer would have to write a {section}, Smarty or not Smarty this is not the question ;) if you don't use Smarty your designer will have to deal with direct php code, at least as complex....
On the learning curve side, as a non developer I can say that its far easier to learn php principles then classes principles then Smarty than learn every thing in the same time and use a wholly mixed stuff.
Today I have on one side a set of classes I wrote, on the other side a set of templates and in the middle Smarty, I don't really have to understand how does Smarty do to manage this mess.. it simply does it, and very well (this is not exactly true I had to struggle a bit to get the caching principles..)
What is needed for non developers are IMHO basic application design principles (I lacked them a lot and probably still lack them today).
For example if you do as the doc says, placing all your templates (*.tpl) files in the "temples" directory, you'll go directly in a very deep mess... I started like this and now I use subdirectories in my "templates" directory.
Same thing for
$smarty->display("template.tpl");
Very simple to explain but in real life it is far easier and more logical (for me) to use the complete path
$smarty->display("file:/home/foo/bar/stuff/temples/mytemplate.tpl");
Not only it allows to use subdirectories but it makes the whole thing more logical to understand once the site get bigger
Luc
At 14:46 07/03/02 +0100, LIMBOURG Arnaud wrote:
To add to this testimony, i would like to add that Smarty is really nice but it is very developer-oriented. Even if luc says that he is not really a developper he had to learn stuff that a developper needs. IMHO, it is difficult to use but the most basic functions when working with designers. And if you're going to use just the {$MYVAR}, you're better off with some lighter solution like vtemplate. Ask a designer to write a {section} ... {foreach} is easier so that removes a bit of complexity. Some of smarty features can only be used by developers, honestly ;)) Arnaud.