[Solar-talk] Solar Observer - brainstorm
Travis Swicegood
developement at domain51.com
Tue Sep 19 07:00:00 PDT 2006
Rodrigo Moraes wrote:
> On 9/18/06, Dinh wrote:
>
>> It may be of interest: http://phpinterceptor.sourceforge.net/ :)
>>
>
> Dinh, it is a very interesting reading. It uses Pear::Event_Dispatcher
> to register and delegate events to "interceptors". I'm confused about
> the difference between interceptors and observers, but I'll try to
> follow his code and stick with Pear::Event_Dispatcher for the event
> handling, and play with the interceptor idea for a while. Thank you
> for the link!
The difference between an observer and a dispatcher with "interceptors"
is the location notification mechanism. With an observer, the
implementing class actually handles the notification, with a dispatcher
that is externalized. Some people consider an observer as an
anti-pattern simply because of the amount of additional work an object
has to take on in order for it to work.
Hope that helps,
-Travis
More information about the solar-talk
mailing list