Home arrow PHP arrow The Data Mapper Design Pattern: A Final Example

The Data Mapper Design Pattern: A Final Example

Welcome to the final part of a series on implementing the Data Mapper design pattern in PHP 5. This series teaches you the key concepts that surround the development of data mapper classes. It complements the corresponding theory with a decent variety of code samples.

TABLE OF CONTENTS:
  1. The Data Mapper Design Pattern: A Final Example
  2. Review: the earlier domain object and the data mapper classes
  3. Building a simple autoloader class
  4. Putting the user mapper class to work
By: Alejandro Gervasio
Rating: starstarstarstarstar / 3
April 07, 2010

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

And now that you've been introduced to the primary goal of this series, itís time to review the topics that were discussed in the previous part. In the course of that tutorial I finished building a basic data mapper class, which in this particular case was responsible for mapping user domain objects to their associated MySQL table via a clean interface.

As one would expect from an appropriate implementation of a data mapper class, the one mentioned above was provided with the ability to perform CRUD operations on the target database table, while keeping the referenced domain objects entirely ignorant of their persistent storage mechanism.

Although describing the role of a data mapper is a fun and instructive process, the best way to understand its actual functionality is by seeing some illustrative examples. Bearing that idea in mind, in this last installment of the series Iím going to code for you a hands-on example that will show you how to utilize the user mapper class built previously to fetch, insert and delete a few user domain objects.

The experience will be fairly educational, trust me. Now, click on the link below and start reading right now!



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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: