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

Object Interaction in PHP: Introduction to Aggregation, part 4

In the fourth and final article in our series covering aggregation in PHP, Alejandro Gervasio reviews the MySQLConnector and Pager classes. He then uses these classes first to build a simple database, then to display some paged results from the database.

  1. Object Interaction in PHP: Introduction to Aggregation, part 4
  2. Assembling classes: a brief look at the “MySQLConnector” class
  3. Assembling classes (continued): the “Pager” class at glance
  4. Putting the classes to work: a practical example
By: Alejandro Gervasio
Rating: starstarstarstarstar / 23
June 15, 2005

print this article



Welcome to the final part of the series “Object Interaction in PHP: Introduction to Aggregation.” Certainly, we've had some hard work, but it's been worth the gain. Implementing aggregation in PHP is one of the most powerful techniques currently available to reveal the strengths of object-oriented programming in production environments.

In the previous articles, I’ve introduced in a step-by-step process, and the concept of aggregation in an object-interactive PHP scenario, as well as its multiple possibilities for application in Web projects. The examples shown as I've guided you through the learning process have been numerous, ranging from simple, rather primitive interaction between basic classes, to more mature linkage of applications such as MySQL database abstraction and paging classes.

Particularly, jumping back into the flow of the examples given in the second and third parts respectively, where we’ve been strongly advised to develop the “MySQLConnector” abstraction class and the “Pager” paging class, we’re going to build a concrete example. This example will demonstrate how these two classes can be put together to work in existing or future applications.

Before we dive deeper into the example, a brief clarification is in order. The sample classes are designed to show clearly the interaction between objects, something that I personally recommend to novice-intermediate developers. Once you understand the core concepts and the theory, you can do more work with the wealth of open source projects widely available on the Web.

Having said that, let’s implement aggregation in our example. It’s going to be fun!

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