PHP
  Home arrow PHP arrow Using Visitor Objects with MySQL Data Sets in PHP 5
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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

Using Visitor Objects with MySQL Data Sets in PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 9
    2006-08-16


    Table of Contents:
  • Using Visitor Objects with MySQL Data Sets in PHP 5
  • Visiting database result sets: establishing an interaction between visitors and MySQL
  • Revealing the anatomy of a visitor class: creating visitor objects
  • Completing the round trip: defining the structure of a pagination class

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    Using Visitor Objects with MySQL Data Sets in PHP 5
    ( Page 1 of 4 )

    If you’re looking for brand new material to help you expand your background in using design patterns with PHP 5, then hopefully this article will suit your needs. Welcome to the final installment of the series “Introducing Visitor Objects in PHP 5.” Composed of three chapters, this series walks you through the key points of creating and using visitor objects with PHP 5, and teaches you how to use them in the context of real-world applications.

    Introduction

    As you hopefully learned over the course of the two previous articles, building visitor classes is not only a fairly comprehensive process that can be done without much trouble, but it's also an exciting  experience, which indeed deserves an in-depth look. That's why in the first article, aside from introducing the fundamentals of visitor objects, I showed you an introductory example, which demonstrated how a specific object, in this case called "the visited one" can accept another (the visitor) to allow the inspection of its properties.

    In addition to the introductory example that I mentioned before, in the second tutorial I went through the development of a slightly more complex example. It illustrated how a highly generic "User" class could be inspected by its corresponding visitor, which resulted in the ability to access of all its visible properties without having to specifically use its own methods.

    So far, implementing visitor objects with PHP is indeed a educational process, which helps to extend even more the boundaries of the vast arena of pattern-based programming. Based on this premise, in the course of this last article, I'll expand the application of the visitor pattern by developing a slightly more realistic example. It will show you how to use visitors objects to establish a direct relationship between a MySQL processing class and a pagination mechanism.

    In return for all the code samples that you'll learn in this tutorial, you'll be equipped with a better grounding, not only with reference to this pattern in particular, but also regarding the main pillars of pattern-based web development. Thus, I think it's time to get rid of the preliminaries, and continue learning more about using visitor objects with PHP 5. Let's move on!



     
     
    >>> More PHP Articles          >>> More By Alejandro Gervasio
     

       

    PHP ARTICLES

    - Using Directory Iterators to Build Loader Ap...
    - Using the spl_autoload() Functions to Build ...
    - Working Out of the Object Context to Build L...
    - Using the _autoload() Magic Function to Buil...
    - The Destruct Magic Function in PHP 5
    - The Autoload Magic Function in PHP 5
    - Developing a Recursive Loading Class for Loa...
    - The Sleep and Wakeup Magic Functions in PHP 5
    - Using the Clone Magic Function in PHP 5
    - Including Files Recursively with Loader Appl...
    - The Call Magic Function in PHP 5
    - Designing a Captcha System with PHP and MySQL
    - Using Static Methods to Build Loader Apps in...
    - The Isset and Unset Magic Functions in PHP 5
    - Advanced PHP Form Input Validation to Check ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT