Do you have a question? Post it now! No Registration Necessary. Now with pictures!
May 8, 2006, 11:10 pm
rate this thread
5. Here now is my 14th example, the Observer pattern.
In the Observer Pattern, a Subject object notifies an Observer object
if it's the Subject object's state changes.
Pretty simple and fairly useful.
An application for this pattern might be having a Subject object with
the state of a web page, and an Observer object which can produce RSS
feeds. If the Subject page changes it notifies the Observer object,
which produces an RSS feed for the changed page.
- » How to give personal user url on a dating website just like MySpace does?
- — Previous thread in » PHP Scripting Forum