News Feed
Sections




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

DevShed:
Working with Multiple Template Files to Separate Logic from Presentation (Part 3)
May 17, 2006 @ 06:07:46

Wrapping up their series on "Seperating logic from presentation", DevShed has posted this final article capping off the creation of a simple template parser in PHP5.

By returning to the subject of this last installment, I'll use the skeleton of the original "TemplateProcessor" class to develop an improved, production-level template processor, which, as you'll see in a few moments, will be capable of working with multiple template files, in addition to implementing a chunked caching system. In this way, the class will be able to use several templates that have distinct cache expiration times, aside from utilizing most of the template processing features that you learned before.

If you haven't read up on them yet, go back and check out part one and part two of the series to catch up. They'll give you the foundation to build from - not just the code but the concepts as well. This third part demonstrates chunked caching of your templates/pages as well as pulling in more than one template file at a time. Throw that all together with the functionality from before and you have an extensible, simple template parsing class they use in a bit more concrete example.

0 comments voice your opinion now!
tutorial template processor seperate logic presentation tutorial template processor seperate logic presentation


blog comments powered by Disqus

Similar Posts

Gonzalo Ayuso's Blog: Building a small microframework with PHP (Part 2). Command line interface

Master Zend Framework: Howto Use Constructor Injection In ZF2

PHPMaster.com: Crop and Resize Images with ImageMagick

DevShed: Developing an Extensible Template Processor in PHP 5 (Part 1)

Engrowe.com: How-to - Convert a RSS feed to JSON in PHP


Community Events





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


configure language testing list wordpress community opinion introduction developer laravel install release code interview unittest framework series refactor podcast threedevsandamaybe

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