In .NET architecture,there are lot of design patterns.I want to know about what is meant with observer pattern and how it is implemented
A good example of observer pattern is shown on MSDN.
You can find it here :
Wikipedia summarises it best:
The observer pattern (a subset of the publish/subscribe pattern) is a software design pattern in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.
An Observer (sometimes known as publish-subscribe
pattern) is best used on GUI interfaces to update states of change on GUI objects such as all other objects can update itself (e.g. resizing a window, then all gui objects such as buttons can re-align itself based on window's size). This is usually done by introducing EventListeners
(which is an Observer pattern).
For implementation, you can view the tutorial from either:
- MSDN: http://msdn.microsoft.com/en-us/library/ms998543.aspx
- Wikipedia: http://en.wikipedia.org/wiki/Observer_pattern
Hope this helps.