News Feed
Sections




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

Matthew Weier O'Phinney's Blog:
A Simple PHP Publish-Subscribe System
December 16, 2008 @ 10:23:26

In a new post to his blog Matthew Weier O'Phinney shares a simple publish-subscribe system he's created based on a feature of the Dojo toolkit using the Zend Framework to create an easy notification architecture.

The system has elements of Aspect Oriented Programming (AOP), as well as the Observer pattern. Its power, however, is in the fact that an individual object does not need to implement any specific interface in order to act as either a Subject or an Observer; the system is globally available.

The script creates an object that publishes an event. This event then sends off messages to all of the other objects subscribing to it. A code example is included. You also can check out the code from its page on github (as a part of his Phly libraries) and play with it yourself.

0 comments voice your opinion now!
phly publish subscribe system dojo object event message


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: AJAX Chat Tutorial Pt 5: Javascript, Sending Chat Messages, Screen Name Changes

Cal Evans' Blog: I've been published in Dr. Dobbs!

Pádraic Brady's Blog: Complex Views with the Zend Framework - Part 4: The View Factory

DevShed: More Examples of Creating Command Objects with PHP 5

Mike Naberezny\'s Blog: Fluent Interfaces in PHP


Community Events





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


laravel configure list series threedevsandamaybe wordpress library community interview framework introduction api application install developer release podcast code unittest language

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