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

Object Interaction in PHP: Introduction to Aggregation, part 2

In this second part of his series, Alejandro Gervasio gets a little more technical with the basics of Aggregation. He begins working with a MySQL abstraction class and a useful paging class, and is starting to get into writing portable code and introducing the technique of aggregation.

TABLE OF CONTENTS:
  1. Object Interaction in PHP: Introduction to Aggregation, part 2
  2. Fetching data with class: the “MySQLConnector” class
  3. Adding Some Functionality to the Class
  4. Improving the “MySQLConnector class: adding row-counting methods
  5. Implementing the “MySQLConnector” class: a practical example
By: Alejandro Gervasio
Rating: starstarstarstarstar / 14
June 01, 2005

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

This is the second part of the series “Object Interaction in PHP: Introduction to Aggregation”. Welcome back. In the first part of this series, we’ve taken a look at one of the most powerful processes involved within object interaction in PHP: Aggregation.

While seasoned developers use classes on a daily basis for development tasks, which implies directly establishing a careful planned interaction between objects, there are a wide range of programmers that maybe are just starting out to learn about the pros and cons of the object-oriented paradigm.  With this concept in mind, by developing a pair of simple classes, we’ve hopefully demonstrated that implementing aggregation in PHP is not as difficult as it seems.

Stepping back and refreshing the concepts covered in the first part, we’ve put on test our abilities as developers, creating a couple of functional classes, that is, “arrayProcessor” and “dataMailer”, making them interact each other, in order to get around quickly in the terrain of aggregation.

Certainly, this is not a condition where you can leap straight away, expecting to know it all in no time, as you probably will agree. As all things in Life, object-oriented programming takes time, but it’s really a very exciting experience. But, what has this to do with aggregation? Everything! I know that you’re getting anxious to learn more about the topic, so let’s get on finding out how we can apply this powerful technique in websites.

In this second part, we’ll get a bit more demanding about ourselves, because we’re going to implement aggregation building two of the most frequently used classes: a MySQL abstraction class and a useful paging class, in order to provide some foundations for writing portable code and introduce our desired aggregation technique. Are you ready to launch forth into the exciting world of object interaction? Let’s get started!



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