News Feed
Jobs Feed
Sections




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

Zumba Fitness Engineering:
Using Application Events to Hook in Plugins
August 09, 2012 @ 09:23:37

In this recent post on the Zubma Fitness Engineering site, Chris Saylor looks at using events in your applications to hook in plugins to easily (and dynamically) enhance functionality.

In many instances, having a plugin system (even for closed-source applications) is a convenient and safe approach to adding functionality to a product. It minimizes risk by not having to modify the core of the source. In this article, I'll be discussing how we implemented a plugin system for our cart software to allow for plugins.

Its implemented a bit like the Observer design pattern - you "register" the listening event which can then be activated by a "trigger" method with the event's name. These events are stored in a registry (static) so they can be accessed across the application.

0 comments voice your opinion now!
events plugin trigger register tutorial observer


blog comments powered by Disqus

Similar Posts

Developer.com: Scaffolding with CakePHP - Managing Your Fantasy Football Team

Vid Luther's Blog: Building PHP 5.3 packages on Ubuntu 9.04 (Jaunty) for Apache 2

Jani Hartikainen's Blog: Zend_Acl part 2: different roles and resources, more on access

Stefan Mischook's Blog: PHP Sessions Video Tutorials - Part 2

HowTo Forge: Installing The PHP-MSSQL Module On CentOS 5.0


Community Events











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


hack example podcast unittest component security application framework package release facebook hhvm introduction symfony2 language composer code opinion install series

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