Home arrow PHP arrow Lazy and Eager Loading with Object Properties

Lazy and Eager Loading with Object Properties

Welcome to the fourth chapter of this series on implementing lazy and eager loading in PHP 5. In five friendly tutorials, this series walks you through the basics of using these powerful approaches for including classes on request in your scripts, and teaches you how to work with these patterns when manipulating properties of a certain class.

TABLE OF CONTENTS:
  1. Lazy and Eager Loading with Object Properties
  2. Review: using the lazy loader pattern with PHP 5
  3. Simple eager loading: examining the user class
  4. Applying eager loading to an instance of the User class
By: Alejandro Gervasio
Rating: starstarstarstarstar / 1
September 23, 2009

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Without a doubt, grasping the key concepts that surround the implementation of the lazy and eager loading design patterns in PHP 5 can be of great help when it comes to developing web-based applications that handle their resources in a truly efficient way.

So, if youíre a PHP programmer who wants to expand your existing skills by learning how to apply the aforementioned patterns in some concrete cases, then donít look any further, because youíve come to the right place.

And now that youíre aware of the objective of this group of tutorials, itís time to review briefly the concepts that were deployed in the previous article. In that installment of this series I demonstrated how to take advantage of the functionality given by lazy loading to include a basic class only when a script really required it. Not earlier, and not later neither.

This was accomplished thanks to the development of a resource-loader module, which exploited the nifty autoloading capabilities offered by PHP 5 to include the mentioned class on demand.

However, as I stated in earlier chapters of the series, lazy and eager loading can be used in multiple scenarios and situations, naturally with different results. So, in this fourth episode Iím going to explain how to utilize the eager loading pattern when handling the properties declared by the same ďUserĒ class that you learned in the previous tutorial.

Want to find out how this will be achieved in a few simple steps? Then begin reading right now!



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