NYCPHP Meetup

NYPHP.org

[nycphp-talk] To Smarty Or Not to Smarty: That Is The Question

LeeEyerman at aol.com LeeEyerman at aol.com
Mon Sep 4 20:04:57 EDT 2006


TO SMARTY OR NOT TO SMARTY: THAT IS THE QUESTION
 
A client of mine is debating, rather furiously, the merits of using Smarty  
in their upcoming web-applications.  Up to this point, I have not used  Smarty 
- and I will admit it - I am an old school programmer who hates OOP, and  to 
me, Smarty looks like another ill-conceived paradigm developed  in OOP that 
creates a lot more hassle than it solves.  
 
We are a small organization.  We do not have more than two PHP  developers 
working on a project at a time.  Our designer works closely with  us to 
integrate CSS, Javascript, etc.  The web sites we create are for  government agencies 
and do not change often, and if they do change, they do not  change very much.
 
I understand the concept behind smarty - separate logic and display.   
However, I do not think Smarty is an end-all solution to all web sites - as many  
people are trying to sell it.  This article, Smarty for Dummies, shares  many of 
the thoughts and opinions I have about Smarty: 
_http://www.fudnik.com/main/tiki-read_article.php?articleId=7_ 
(http://www.fudnik.com/main/tiki-read_article.php?articleId=7)  -  it is a good read.
 
Can anyone give any guidance about when to and when not to use  Smarty?  Does 
anyone agree/disagree that Smarty may just be a giant  abstraction of logic 
and design, wrapped in a horrible OOP mess?  Does  anyone agree/disagree that 
using Smarty in small applications, that do not  change much, and do not have 
separate (or large) development teams may be more  burdensome than it is worth? 
 Is anyone concerned that using Smarty as part  of your systems make them 
less portable?  Am I missing something, or is  Smarty just not meant to be used 
in small development environments?
 
I do not like the idea of developing web apps using Smarty because of  the 
additional requirements of installing smarty.  I am also concerned  that Smarty 
may be built upon technologies that may be part of a current patent  or part 
of a patent that is pending.  Smarty is not that old, and it  could potentially 
infringe a patent by another company like MS.   I  also do not know if Smarty 
is supported in the open-source community as well as  PHP and MySQL.  
 
I also cannot stand the editing of multiple documents, both containing bits  
and pieces of logic - I know, one is application logic, the other is display  
logic.... is this really logical?  Bouncing between documents does not seem  
efficient, and it also seems quite possible that a web designer could still  
screw up the display logic.... hmmm... 
 
Whether you would still call Smarty a new paradigm is up for  question.  
However, I am having a hard time understanding any benefit for  small 
sites/organization who need to deliver SOLID solutions fast, on-time, and  within budget.  
Can anyone tell me how Smarty can increase  productivity?  Can it save time?  
Can it save money?  Does it  make your web-app any more secure? Doesn't it 
actually make your applications  slower - all that code to process - and I know, 
it does the pre-processing - but  still, OOP requires more code that 
procedural any day - and looking at Smarty  code, it looks like a OOP mess.  
 
Like OOP, I can do everything Smarty does, faster and easier in procedural  
PHP on one page.  Why in the world would I change to Smarty?  
 
It is also interesting to note that very few open-source applications  use 
Smarty.  PHPBB does not use it, OSCommerce does not use it, PHPMyAdmin  does not 
use it, etc.  If Smarty were so good, why haven't more open-source  projects 
adopted it?
 
Any information that could assist my reasoning, one way or the other, would  
be greatly appreciated!
 
Thank you in advance!
Lee
 
 
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20060904/b8e75636/attachment.html>


More information about the talk mailing list