Introduction The Observer Pattern (also known as Publish-Subscribe Pattern) is a behavioral design pattern which defines a one-to-many dependency between objects so that when one object changes its state, all its dependents are notified and updated automatically. Observer Pattern allows for consistency between related objects without tightly coupling classes. Key Participants The classes and objects participating in this pattern are: Subject Interface Knows its observers – provides interface for attaching/detaching subjects. Observer Interface Defines an interface for notifying the subjects of changes to the object (e.g. Data) Concrete Subject Sends notification to observers when state changes. Concrete Observer Implements...Read More
Author: Umar Siddique
About The Author
Principal Software Engineer. Umar has proven success in leading teams in the creation of Microsoft .NET/BizTalk based solutions. He has over 11 years of software development experience with expertise in application integration, B2B solutions, application design, and custom development.
The facade pattern is a Gang of Four design pattern and comes under a structural pattern as this pattern adds an interface to the existing system to hide its complexities. This pattern involves a single class which provides simplified methods required by the client and delegates calls to methods of existing system classes. The Facade design pattern is particularly used when a system is very complex or difficult to understand because it has a large number of interdependent classes, or its source code is unavailable. The facade class is a “wrapper” that contains a set of members that are...Read More