Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Object Interaction in PHP (Aggregation - Part 3)
Jun 08, 2005 @ 15:22:47

Part Three of DevShed's "Object Interaction in PHP: Introduction to Aggregation" has been posted today - diving deeper into the example paging class and techniques used to aggregate a new "MySQLConnector" class.

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.

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!

They flesh out the MySQLConnector class a bit more, reworking the displayRecords function and building the page links as examples of refactoring. Once done, it allows you to quickly create a paginated MySQL-based recordset for your site - as well as have the concepts of aggregation under your belt. Keep an eye out for the fourth and final article in the series - giving you a very concrete example of all of the concepts learned so far.

tagged:

Link:


Trending Topics: