News Feed
Jobs Feed
Sections




News Archive
PHPMaster.com:
An Intro to Virtual Proxies, Part 2
April 26, 2012 @ 09:24:23

Following up on his previous article, Alejandro Gervasio has a new post to PHPMaster.com with the second part of his series on using virtual proxies in PHP.

Resting on the foundation of Polymorphism (dynamic Polymorphism, not the ad-hoc one often achieved through plain method overriding), Virtual Proxies are a simple yet solid concept which allows you to defer the construction/loading of expensive object graphs without having to modify client code.

He shows how to create a collection of domain objects that use proxies to populate their data. He includes the code for creating a "Post" interface/object as well as a Comment interface/object. These are put into a "CommentCollection" and, when it's accessed, pull the item in the collection out, only populating the data on demand.

0 comments voice your opinion now!
virtual proxies introduction series collection domain object


blog comments powered by Disqus

Similar Posts

Web Species Blog: Virtual Machines for Web Developers

Zend Developer Zone: Mobile Platforms Built On Object-Oriented PHP 5

Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 7)

Nefarious Designs: Object-Oriented PHP Part 2: Relationships

CodeSnipers.com: Book review: Beginning Ajax with PHP by Lee Babin


Community Events









Don't see your event here?
Let us know!


composer opinion interview object code testing event unittest framework zendframework2 introduction community api release phpunit language example development functional database

All content copyright, 2013 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework