Name of the blog

Short description of the blog

Observer Pattern in ASP.NET

What is Observer Pattern ?

  • Observer Pattern is a Behavioural Pattern which allows one-to-many dependencies between objects so that when one object state changes, all dependent objects can be notified and updated automatically.
  • The Observer Pattern is used to implement communication between objects. Since the state of an object (we'll call it subject) is constantly changing, the Observer pattern allows us to define a one to many dependency between other objects (we'll call them observers) to communicate with them letting all the observers know that a subject has changed its state.
  • This allows us to notify all observers with a single mechanism.
  • The Observer Pattern is set up in the publisher/subscriber pattern, and is excellent for implementing distributed event handling systems and such. This pattern also goes a long way towards removing the coupling between the subject & observer with the use of the IObserver interface.
  • The observer design pattern defines a one to many dependency between an object and its dependents. The dependency is created in order to inform the dependents that the object changed its state and therefore the dependents can react to the change.
  • A very good example of such behavior is the blogging systems were subscribers are notified whenever a blogger published a new post.

http://www.c-sharpcorner.com/uploadfile/shinuraj587/observer-pattern-in-C-Sharp/

http://dotnet.dzone.com/articles/design-patterns-c-observer

http://msdn.microsoft.com/en-us/library/Ee817669(pandp.10).aspx

http://www.codeproject.com/Articles/42255/Observer-Pattern-in-ASP-NET

http://wiki.asp.net/page.aspx/490/observer-pattern/

http://msdn.microsoft.com/en-us/library/ms998543.aspx

http://msdn.microsoft.com/en-us/library/ee850490.aspx

Add comment

biuquote
  • Comment
  • Preview
Loading