Why Do People Hate Smarty?

During the beginning of this year I started noticing many people, including web developers and designers, causing an uproar about Smarty being so-called “dead.” At the time I thought nothing of it. “Oh, just some newbies blowing smoke.” But, recently it’s been getting heard more and more. I got curious today so I started investigating.
I found the point of origin of the intoxicating rumor. Hasin Hayder, co-author of the book “Smarty PHP Template Programming and Applications”, wrote a blog post stating a few comments about the use of MVC frameworks and the likes. The post can be found here. Anyways, he goes on saying how Smarty is pretty much a lost cause because of the “ease of development” the frameworks allow and pretty much leaves it at that.
Well, Mr. Hayder, you may have co-authored a book about Smarty but you surely don’t know a thing about WHY people use Smarty…which leads me to suspect your true involvement with putting together that book. This is why people use Smarty:

  • Logical separation of business/design. Using Smarty’s templating schema is very much easier than using PHP.
  • Smarty employs security within the templating system itself. Sure you can still execute php code using {php}, but you can always disable it.
  • Smarty employs caching without utilizing external sources.
  • Smarty can be integrated easily into pre-existing content management systems or used stand-alone…others cannot.
  • Why build something else which serves the same purpose when Smarty is already made, free, and has pretty much EVERYTHING you could ever possibly want in a template system?

Bottom line: Smarty is best suited for use when you may not allow your designers and developers to work with one another on the same files/templates or allow them access to PHP, with which you have total control over the system. (I’m sure your designer isn’t modifying system-related data on your server…right?) Smarty makes sure that designers cannot make systematic mistakes. If they make a mistake, it will be design related.
So, bottom-bottom line: Smarty helps you protect your system from outside sources as well as even from the users themselves!

Spread The Word: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Technorati
  • StumbleUpon
  • Slashdot
  • Reddit
  • Spurl
  • Live
  • YahooMyWeb
  • e-mail

Leave a Reply

You must be logged in to post a comment.