News Feed
Jobs Feed
Sections




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

DevShed:
Developing an Extensible Template Processor in PHP 5 (Part 1)
May 02, 2006 @ 13:58:09

Building web aplications that split out the responsibilities correctly is becoming more and more important. Developers are creating more complex applications, and cluttering up the presentation with the logic of the code can only make things more of a nightmare down the road. Thankfully, there are articles like this one from DevShed to help you template your site correctly.

This is the first part of a three-part series that covers separating logic from presentation in PHP applications. In this article you will learn to develop a template system that is advanced enough to meet the requirements of a majority of applications.

It's possible to develop an intermediate template system that meets the requirements of a vast majority of applications, without the need to appeal to basic packages or having to deal with the numerous features of Smarty. It's precisely for this reason that this series will be focused on developing an extensible template processor in PHP 5.

You'll need a bit of experience with templating your site before you get started, as they begin with a basic structure of the template processor before anything. They demonstrate the code to create the "TemplateProcessor" class and defining the "processTemplate" method inside it. By the end of this first part in the series, they've created a very simple templating class that could be used as is for base-level projects. Stay tuned for more, though, if you're hungry for more features.

0 comments voice your opinion now!
tutorial extensible seperation template system logic tutorial extensible seperation template system logic


blog comments powered by Disqus

Similar Posts

NETTUTS.com: CodeIgniter From Scratch: Day 4 Newsletter Signup

DevShed: Using Recursive Methods in Object-based PHP Applications (Part 2)

Pablo Viquez: PHP Step by Step Debugging with JMeter, XDebug & Eclipse PDT

Jason Houle's Blog: Zend Framework: The Dijit Editor

Stefan Mischook's Blog: Object Oriented PHP Videos are now out!


Community Events











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


hhvm facebook symfony2 code application unittest language example install framework security release package podcast component composer overview hack opinion introduction

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