Re: [SMARTY] smarty templates vs. php templates

From: Date: Tue, 05 Apr 2005 23:16:41 +0000
Subject: Re: [SMARTY] smarty templates vs. php templates
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12409@lists.php.net to get a copy of this message
David Ngo wrote:
At my work I work with a html designer and one other programmer. Both of them refuse to learn to use Smarty and keep arguing that we should do
sounds pretty sad when a (php) 'programmer' refuses to learn something.
away with it. My boss's take on it is that Smarty adds complexity with
its a good idea to hide the relative complexity of smarty from the programmer by creating a subclass of smarty which set up the output environment automagically. do you have one or more Smarty subclasses?
little benefit. Their solution is to just do away with the templates and instead have php include files with html in them that will act as the templates.
which pretty much replicates Smarty. and if you use Smarty properly then their system wouldn't be any faster either, on average (sure you can optimize something like crazy, but then really you should be writing C right?).
We also have a proposed solution using xml that can replace the caching options that Smarty has built in. I have to come up with a few examples where using Smarty is a better solution. Does anyone have
what about your current work?
any extremely convincing examples I can use to change these people's
<?php $marty = '$marty'; $extremely_convincing == " a free team of dedicated programmers who maintain $marty. a veritable army of $marty users."; echo " $marty = '$marty'; \$extremely_convincing == \"$extremely_convincing\""; ?>
minds? All of the examples I have seen on the Smarty site and through google are very simplistic examples that could easily be replaced by php includes. I do not want to move away from Smarty because I feel it makes my code better structured, easy to read, and just forces me to have better coding habits. However how do I explain to someone that has never
this, I think, is a good argument. but it maybe worth considering that possibly Smarty has given you insight into how to write better, more maintainable code and that you are not bound, so to speak, to Smarty.
used Smarty and refuses to learn it that it is the way to go? I fear
why does your boss accept someone refusing to 'learn' Smarty (any half-baked programmer should get up a running in about five minutes especially considering you standing next to him pointing the way :-), if the guy knew how to use it properly and then said he had a better way then _maybe_ it worth giving a shot. but what is the end cost likely to be of building a new custom tool?... "only Smarties(tm) have the answer" but Smarty is not always the answer, it comes down to which codebase delivers the best cost/benefit ratio) Smarty is mature, that counts for alot, and it comes for free. It is also to be noted that Smarty has a php.net domain, that seems to me a sutble indication that Smarty is probably considered a very good implementation of a framework to 'seperate presentation logic from everything else', backed by solid documentation (with simple examples, as you said, which is just the ticket for a newcomer).
that if I can't come up with some good examples we will switch to the system of using php includes as templates which I do not like at all.
btw, what does the (html) designer say? also, whats the status of the Smarty replacement? are you capable of working with it? (thats not meant to be derogatory, nobody groks everything, right?) rgds, Jochem PS - I just read Dans reply... he said it better :-) PPS - If you _really_ believe that Smarty is the best option for you team then you have it within you to show your co workers that it is so, but also consider the possibility that in your particular situation the other guy might have the better solution.

« previous php.smarty.general (#12409) next »