News Feed
Sections




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

Smashing Magazine:
Getting Started With PHP Templating
October 18, 2011 @ 09:15:49

On the Smashing Magazine site today there's a new post introducing you to templating in PHP applications. They cover both the creation of a simple, custom templating library as well as using a more widely known too - Twig.

In this article, we'll cover how to separate the view of your PHP application from its other components. We'll look at why using such an architecture is useful and what tools we can use to accomplish this. [...] To fully benefit from this article, you should already know how to write and run your own PHP scripts on a Web server (i.e. using Apache).

They start with the very basics of templating, mostly pointing out how it reduces the dependency of having layout code directly in your application's logic. It makes things easier to reuse and makes for better code structure in the long run. They mention other templating engines like Smarty, PHPTAL and Twig, but focus in on the last for their code samples. They show basic templating, making reusable templates, applying filters and working with simple control structures.

0 comments voice your opinion now!
templating tutorial introduction twig smarty phptal


blog comments powered by Disqus

Similar Posts

DevShed: Building File Uploaders with PHP 5

Rafael Dohms' Blog: Deploying a Symfony2 and Composer app on PagodaBox

CodeForest.com: Creating simple tasks app with Backbone.js and Slim micro framework (part 1)

Web Development Blog: Sending e-mails via SMTP with PHPmailer and Gmail

DevShed: Creating a MySQL Abstraction Layer with Bridge Classes in PHP 5


Community Events

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


opinion voicesoftheelephpant release series framework example interview introduction conference application community symfony2 library extension api php7 podcast laravel version performance

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