Home arrow PHP arrow Object Interaction in PHP: Introduction to Aggregation, part 3

Object Interaction in PHP: Introduction to Aggregation, part 3

In the third part of his series, Alejandro Gervasio digs a bit further into object-oriented PHP. He explains the barebones of a paging class and techniques used to aggregate a new “MySQLConnector” class.

TABLE OF CONTENTS:
  1. Object Interaction in PHP: Introduction to Aggregation, part 3
  2. Moving back and forth: building a paging class
  3. Refactoring the “displayRecords()” method
  4. Completing the refactoring process: building the paging links
By: Alejandro Gervasio
Rating: starstarstarstarstar / 18
June 08, 2005

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Good to hear from you again, dear faithful reader! Welcome to the third part of my series, “Object Interaction in PHP: Introduction to Aggregation.” Have you been playing and tweaking the code for the MySQL abstraction class, presented in the second part?  I hope you did!

But, let’s get straight to the point that’s keeping our minds busy. In a progressive way, we’ve introduced the concept of Aggregation in an object-oriented environment, highlighting the immediate benefits of applying it in our applications. Besides, in a worthwhile attempt to lead directly into the development of several classes and make them interact in conjunction, we’ve completed the first half of the cake building our “MySQLConnector” class, in order to work with MySQL, this time using the power of the object-oriented paradigm.

However, it looks like the round is rather incomplete, right? Yes, you’re correct. But, don’t feel disappointed. In this third chapter of the story, we’ll expose the barebones of a paging class, as well as the techniques used to “aggregate” our brand new “MySQLConnector” class inside this structure. Definitively, working with simple yet efficient classes, gives to us the right guidelines to dig deeper in the exciting scenario of object-interaction in PHP.

So, armed with these concepts, it’s time to get our hands a bit dirty, starting out to create the paging class and establish the corresponding interaction between classes. Let’s go!



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

blog comments powered by Disqus
   

PHP ARTICLES

- 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...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 3 - Follow our Sitemap

Dev Shed Tutorial Topics: