I thing the example in article 2 is great but i don't think is necessary to
create a component to register observers.

Observer pattern need two part, Subject and Observer, so i think you need
another observer behavior ( not only observable behavior ).

Observer pattern is usually implemented by interface, cakephp's behavior
can do the same.


On Wed, Nov 23, 2011 at 12:34 PM, amiable_indian <[email protected]>wrote:

> Hi All:
>
> I would like to implement observer pattern [1] in my project and would
> like to hear your suggestions regarding cake's way of doing it the right
> way. Most web searches led me to an article [2] written in 2009. I am sure
> a lot of things have changed since then :)
>
> In my project (*which tracks movement of domain names and ipaddresses*),
> I am looking to implement observer pattern where whenever the subject (*e.g.
> domain name*) changes (*e.g. moves to a new ipaddress*), it triggers
> multiple observers such as reputation, blacklisted, whitelisted, ranking,
> geo-location, etc...
>
> Thanks in Advance,
>
> [1] http://en.wikipedia.org/wiki/Observer_pattern
> [2]
> http://nuts-and-bolts-of-cakephp.com/2009/08/10/observer-pattern-the-cakephp-way/
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>



-- 
Perry | 彭琪
http://pengqi.me

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to