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.

  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



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
escort Bursa Bursa escort Antalya eskort


- 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: