MySQL
  Home arrow MySQL arrow Writing Your Own Template Caching Class In...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MYSQL

Writing Your Own Template Caching Class In PHP
By: Havard Lindset
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 5
    2002-11-19

    Table of Contents:
  • Writing Your Own Template Caching Class In PHP
  • How Is It Supposed To Work?
  • The Code Explained (contd.)
  • The Code Explained (contd.)
  • Real-World Examples
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Writing Your Own Template Caching Class In PHP


    (Page 1 of 6 )

    Writing your own template caching class with PHP doesn't necessarily mean that you have to invent your own template tags, as Havard shows us in this article...If you've been involved in web development for a while, then you've probably seen the uprise in popularity of using templates. Templates, at least the way I speak of them, are a way for developers to separate content from their actual programming code. You may have read my article about patTemplate, simple called "Simple PHP Templates With PatTemplate", which I wrote in June. In it, I explained how to use an already existing template engine. This time, I'll be explaining how you can write your very own template class with built-in caching features.

    When I first started writing this class, I decided that the templates should use normal PHP – as opposed to custom tags -- as the template language. By using normal PHP, we can eliminate the overhead many of the other template engines out there get by using their own template languages and parsers.

    In this article I will assume that you have at least a basic understanding of PHP and OOP. Now, let's get down to business and start writing the class...

    More MySQL Articles
    More By Havard Lindset


     

    MYSQL ARTICLES

    - MySQL and BLOBs
    - Two Lessons in ASP and MySQL
    - Lord Of The Strings Part 2
    - Lord Of The Strings Part 1
    - Importing Data into MySQL with Navicat
    - Building a Sustainable Web Site
    - Creating An Online Photo Album with PHP and ...
    - Creating An Online Photo Album with PHP and ...
    - PhpED 3.2 – More Features Than You Can Poke ...
    - Creating An Online Photo Album with PHP and ...
    - Creating An Online Photo Album with PHP and ...
    - Security and Sessions in PHP
    - Setup Your Personal Reminder System Using PHP
    - Create a IP-Country Database Using PERL and ...
    - Developing a Dynamic Document Search in PHP ...







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway