PHP
  Home arrow PHP arrow Processing File Data with Template Cla...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
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? 
PHP

Processing File Data with Template Classes in PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2007-03-26

    Table of Contents:
  • Processing File Data with Template Classes in PHP 5
  • Building a basic file processing class
  • Creating a simple template class
  • Building a few simple subclasses
  • Seeing the template pattern in action

  • 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Processing File Data with Template Classes in PHP 5


    (Page 1 of 5 )

    If you're looking for a friendly guide on how to implement the template design pattern with PHP 5, then this group of articles might be what you need. Welcome to the final installment of the series that began with "Working with template classes in PHP 5." As the title indicates, this series steps you through creating template classes in PHP-controlled development environments, and also shows you how to use this rather uncommon pattern in real-world situations.

    Introduction

    Stepping back for a moment to the preceding article of the series, you'll remember that I demonstrated via a step-by-step process not only how to build a template class in PHP, but how to use it in conjunction with a few handy subclasses. Indeed, the purpose of developing the programmatic model dictated by the pattern was simply to create a group of interrelated classes, which were capable of applying different (X)HTML formatting tags to a given MySQL result set.

    Of course, if you already understand how the aforementioned example worked, you shouldn't have major problems grasping all the code samples that I plan to include in this final article of the series. Why do I say this? Well, to be frank, I believe that the best way to understand the logic of a given pattern is by demonstrating its implementation with numerous hands-on examples.

    Therefore, taking into account this important premise, over the course of this last tutorial I'm going to provide you with a few more examples of how to build template classes with PHP 5. More specifically speaking, what you're going to learn here will be how to create a set of template objects that will control the visual appearance of data fetched from different files.

    Logically, according to the definition imposed by the template pattern, there will be a base class responsible for setting up a specific algorithm via one of its methods, and other subclasses that will use the algorithm in question.

    All right, having established the objective of this article, it's time to move on and keep learning how to build template classes in PHP 5. Let's begin now!

    More PHP Articles
    More By Alejandro Gervasio


       · Over the course of this final installment of the series, what you’re going to learn...
     

       

    PHP ARTICLES

    - Viewing and Editing Tasks for a Project Mana...
    - More on Private Methods with PHP 5 Member Vi...
    - Adding Tasks to a Project Management Applica...
    - Utilizing Private Methods with PHP 5 and Mem...
    - Making Changes in a Project Management Appli...
    - Defining Public and Protected Methods with M...
    - HTML for a Project Management Application
    - Using Subclasses and Accessors with Member V...
    - Implementing Internet Protocols with PHP
    - Project Management: The Application
    - Working with Private Properties to Protect P...
    - Protecting PHP 5 Class Data with Member Visi...
    - Setting Up a Web-based Image Hosting Service
    - Comparing Files and Databases with PHP Bench...
    - Setting Up a Web-Based Image Gallery





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