News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

NETTUTS.com:
Introduction to the Smarty Templating Framework
September 15, 2010 @ 10:08:35

On NETTUTS.com today there's a new tutorial introducing you to one of the more well-established templating tools for PHP-based applications - Smarty. It provides abstraction between your data and the output of the site, making is simpler to maintain in the long run.

Smarty is a PHP-based templating engine/framework. It allows you to further separate your business logic from its visualization, by removing as much PHP code as possible away from your views. Some developers and frameworks prefer not to use a templating engine, others do prefer them to using plain PHP in your views. Both points of view can be argued, and in the end, it's mostly a matter of taste. Anyway, it's never a bad idea to try it out before deciding not to use it, and that's what this tutorial is about: trying out the Smarty Templating Framework.

They introduce it in a series of five steps (well, six):

  • What To Expect
  • Setting Up The Project
  • Creating The SMTemplate Class
  • Assigning and Formatting Variables
  • Working With a Layout
  • Creating Your Own Modifiers

Each of these comes with code examples and full descriptions so that, by the end of the tutorial, you'll end up with a full "Hello World" template system. The modifiers let you augment the base Smarty functionality to handle custom types and make handling the data even simpler.

0 comments voice your opinion now!
smarty template framework tutorial introduction


blog comments powered by Disqus

Similar Posts

Henri Bergius\' Blog: Interested in the Zend PHP Framework

Chris Hartjes' Blog: Tutorial: Integrating PHP/SWF Charts with CakePHP

Zend Developer Zone: Zend Framework Proposal Weeks Start June 12th

Eirik Hoem's Blog: Prado Framework 3.1.2 released

Komunitasweb.com: Showing the weather with PHP and Google Weather API


Community Events

Don't see your event here?
Let us know!


voicesoftheelephpant framework laravel5 wordpress series development introduction extension library community language laravel api opinion feature threedevsandamaybe release unittest podcast interview

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework