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

Peter Sawczynec ps at
Tue Sep 5 09:59:06 EDT 2006

I've never used Smarty for a project, but I've examined many opensource
projects that are structured to 
one degree or another on the separation of design and business logic
principles of a template system like Smarty.
I have found that every new project/system (new to you the developer(s)) has
a learning curve. Minimum one-day 
as much as 5 days to understand the configuration techniques and the custom
functions/tools/techniques that 
are in place. 
I believe that the very high degree of abstraction provided by a template
system like Smarty can be invaluable in 
any known development environment that truly separates the non-programmer
designer(s) from the 
non-designing programmer(s)
But, maybe I've led a sheltered life, but every time I've worked in the web
unit of a corporate environment, large and small, 
everyone even the 'designers' was pretty much a programmer in the code
language(s) and OS in use in the company. 
Typically, also the company has long ago found that no matter what original
system/tools were developed/purchased that 
there is constant need for advanced customization/features and they are knee
deep in proprietary systems and 
in-house techniques that give the company competitively unique advantages on
the web.
I thought also the job demands of the IT industry today pretty much demand
that you be a programmer/designer 
and there really are no jobs for strictly non-programming designers.
I rather like that direction, as I believe that the skill set and the
diversity that multifaceted designer/programmers bring to the table 
is far more valuable to a fast-moving tech company than multiple teams of
highly segregated niche designers and 
programmers that only pow wow once per week in a two-hour antsy session.
So, therefore, roughly on principle I would tend to lead clients towards
free or low-cost, high-powered specialized 
opensource projects intended for their business category (projects like
PHProjekt, osCommerce, Gallery, Coppermine, 
Open-Realty,  Joomla) that bring so many great features to the table. And
then you as the versatile, sophisticated 
developer team can dive in and customize the front end rather handily and
create/designate your own custom only 
as-needed design option injection points. 
So you don't sell future design flexibility to the client but instead sell
them the far more sensible and satisfying infinitely 
expandable feature set(s) and advise them they shouldn't be changing their
web site look any sooner than every 
five years anyway, so changeable design in templates is not the big issue.
I believe you will find very few places where you can fit a Smarty system
into a complex highly-competitive business/web 
development environment that is itself setting new standards on the web
But, Smarty is a great project and great idea and the convenience to
complexity ratio may need some tweaking.
Warmest regards,
Peter Sawczynec,
Technology Director
_Design & Interface
_Database Management
ps at

-----Original Message-----
From: talk-bounces at [mailto:talk-bounces at] On
Behalf Of LeeEyerman at
Sent: Monday, September 04, 2006 8:05 PM
To: talk at
Cc: smurakami at; mbleich at
Subject: [nycphp-talk] 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: - it is a good
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
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!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the talk mailing list