Proxy Pattern

This is not same as Bridge Pattern. “Provide a surrogate or placeholder for another object to control access to it” is the intent provided by GoF.   When to use this pattern? Proxy pattern is used when we need to create a wrapper to cover the main object’s complexity from the client. Types of proxies Remote… Continue reading Proxy Pattern

Advertisements

Adapter(Wrapper) Design Pattern

Youtube This pattern is easy to understand as the real world is full of adapters.   For example consider a USB to Ethernet adapter. We need this when we have an Ethernet interface on one end and USB on the other. Since they are incompatible with each other. we use an adapter that converts one to… Continue reading Adapter(Wrapper) Design Pattern

Facade Pattern

The Law of Demeter (LoD) or principle of least knowledge is a design guideline for developing software, particularly object-oriented programs. In its general form, the LoD is a specific case of loose coupling. The guideline was proposed by Ian Holland at Northeastern University towards the end of 1987, and can be succinctly summarized in each of the following ways: Each unit should have only… Continue reading Facade Pattern

Design Pattern

Basic Understanding Factory Pattern - example Abstract Factory Pattern - example What is the basic difference between the Factory and Abstract Factory Patterns? With the Factory pattern, you produce implementations (Apple, Banana, Cherry, etc.) of a particular interface -- say, IFruit. With the Abstract Factory pattern, you produce implementations of a particular Factory interface --… Continue reading Design Pattern