By dncdude
via dotnetcube.com
Published: Sep 22 2009 / 12:31
The Observer Pattern belongs to the category of Behavioral patterns. In some applications, the state of an object (the subject) is constantly changing (Ex: the price of a product varies depending on market demand). There could be other objects (observers) that are interested in getting notified when the state of the subject changes. The Observer Pattern can be used to communicate the changes between a subject and one or more observers. The Observer Pattern defines a one to one dependency between the subject and the observers so that when a subject changes state, all the observers are notified.



Add your comment