News Feed
Sections




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

ServerGrove Blog:
Symfony2 components overview EventDispatcher
October 25, 2013 @ 11:52:31

The ServerGrove blog continues their spotlight on the various components that make up the Symfony2 framework in their latest post about the EventDispatcher.

For many years, in the PHP world we were used to code following a linear flow, where instructions were executed one after another, jumping to functions or methods. Events change the way we design our software and allow us to decouple different parts creating small and reusable classes with a well-defined goal.

The post includes a brief introduction to the Mediator design pattern and how the EventDispatcher implements it. Sample code is included showing how to make a dispatcher, add events and dispatch an event to a waiting listener. There's also a comparison between "event listeners" and "event subscribers", pointing out that the latter has more flexibility when it comes to event priority.

0 comments voice your opinion now!
symfony2 component overview eventdispatcher tutorial

Link: http://blog.servergrove.com/2013/10/23/symfony2-components-overview-eventdispatcher/

blog comments powered by Disqus

Similar Posts

DevShed: Building Object-Oriented Web Pages with Inheritance in PHP 5

NETTUTS.com: CodeIgniter From Scratch: Day 2

Wb Developer Juice: 10 baby steps to install Memcached Server and access it with PHP

SitePoint PHP Blog: Debugging with Xdebug and Sublime Text 3

Elizabeth Smith's Blog: How to Compile PHP5.2 and PHP-GTK2 on Windows using Visual C++ Express


Community Events





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


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

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