PHP
  Home arrow PHP arrow Creating a MySQL Abstraction Layer with Bridge Classes 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

Creating a MySQL Abstraction Layer with Bridge Classes in PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 4
    2007-01-17


    Table of Contents:
  • Creating a MySQL Abstraction Layer with Bridge Classes in PHP 5
  • Creating the first abstraction layer for MySQL
  • Creating a bridge class with PHP 5
  • Putting the MySQL abstraction layer to work

  • 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


    Creating a MySQL Abstraction Layer with Bridge Classes in PHP 5
    ( Page 1 of 4 )

    If learning how to incorporate creational design patterns into your own PHP 5 applications is a high-priority topic for you, then this set of comprehensive articles might be what you’re looking for. Welcome to the concluding installment of the series “Using Bridge Classes with PHP 5.” These tutorials will teach you how to implement the bridge pattern in PHP by providing you with many hands-on examples that can be included in your existing and future web projects.

    Before I move on and pay attention to the subject of this final article, first I'd like to refresh, at least quickly, some topics that were covered with detail in the preceding part of the series. As you'll certainly recall, in the previous tutorial I extended the implementation of the bridge pattern with PHP 5, by defining a bunch of straightforward classes, which when used in conjunction, followed the principles dictated by the mentioned pattern.

    Speaking more specifically, I created a bridge class called "BridgeDataValidator" which defined the generic structure of a data validation object. This is handy for checking different types of user-provided input. However, the most relevant aspect of this schema rested on the capacity offered by the referenced class to create distinct data validator objects. These objects implemented concretely the required logic for checking numbers, alphabetic values, and email addresses.

    Naturally, the data validation objects were conceived as independent structures, which resulted in the complete decoupling of the "BridgeDataValidator" class from its own implementation. Of course, if you're familiar with how the bridge pattern works, then you'll realize that all the classes that I developed in the previous tutorial precisely followed that model.

    Now that I hopefully refreshed the topics that were treated in the preceding article of the series, it's time to focus your attention on the current one. The question that comes up now is the following: is there anything else that can be said about the bridge pattern? Of course there is! In this final tutorial I'm going to show you how to create a highly expandable abstraction layer that will allow you to work with MySQL using different libraries. This sounds interesting, right?

    Having introduced the subject of this installment, let's leap forward and discover together how to build a MySQL abstraction layer, in this case using the bridge pattern. Let's get going!



     
     
    >>> 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 2 hosted by Hostway
    Stay green...Green IT