PHP
  Home arrow PHP arrow Using Visitor Objects with MySQL Data ...
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 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
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: 4 stars4 stars4 stars4 stars4 stars / 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:
      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


    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


       · Over the course of the final part of the series, you'll learn how to apply the...
       · Not only it's incorrect implementation of a Visitor pattern, but it's also useless...
       · Well, first off, thanks for your criticisms on this article. It's always good to...
     

       

    PHP ARTICLES

    - Using Aliases and the Autoload Function with...
    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Sub Classing Exceptions in PHP 5
    - Building a Content Management System with Co...
    - Filters and Login Systems for Web Applicatio...

     
    Application Delivery: Everything You Wanted to Know, but Didn`t Know You Needed to Ask
    A comprehensive guide to examining the topics of Wide-area Data Services and app....

     
    Best Practices: Safe and Secure Hardware Asset Recovery
    Companies increasingly must meet EPA and local requirements for the disposal of ....

     
    Managing SSL Security in Multi-Server Environments
    Read this white paper to learn how to simplify management of your organization's....

     
    Open Source Security Myths
    Open Source Software (OSS) is computer software whose source code is available t....

     
    Power and Cooling Capacity Management for Data Centers
    This paper describes the principles for achieving power and cooling capacity man....

     




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