Smarty templates? 7 benefits of using the smarty template engine

Written by Joe on Thursday, February 11, 2010

The goal of the smarty template engine is to seperate your application code from your presentation code.  In large applications this allows the developers to work on the application side, the php, and the designer to work on the presentation side, the html.  Your php code would collect the data to be diplayed, usually from a mysql database, assign it to a template variable, and the template handles displaying the html.

Here are 7 benefits of using the smarty template engine.

  1. Changing the look and feel of your site is as simple as changing the templates and style sheet.  Your application code can stay the same.
  2. Designers don't have to worry about editing templates.  Since the application code passes data to the template, the designer can do what they need and not worry about the application code.
  3. Your application code is completely seperate from your presentation code.  This makes your application code lighter and easier maintain.
  4. Since your application code is completely seperate from your presentation code, you can easily maintain the code without worrying messing up the design.
  5. Smartys error handling makes errors easy to understand and fix.
  6. Smarty has built in security to prevent presentation code from allowing a security breach.
  7. Caching.  Smarty caches the output of your site which saves time on executing the code each time the page is viewed.

These are just a few of the benefits of using the smarty template engine.  Check out smarty.net to learn more about the smarty template engine and to download the latest version.

Like what you’ve read?

Link back to us.
http://www.revolutionunlimited.com/news-and-articles/php/2010-02-11/smarty-templates-7-benefits-of-using-the-smarty-template-engine/

OR Join Our Mailing List

* indicates required fields

Pulling your hair out over your website?

Contact us today to get a professional website at a great price.

Contact Us Today

Post A Comment