Skip to content
Rashi Agarwal edited this page Sep 1, 2016 · 6 revisions

Design Patterns

Creational

1. Abstract Factory - Provide an interface for creating families of related or dependent objects without specifying their concrete classes.

2. Builder - Separate the construction of a complex object from its representation so that the same construction process can create different representations.

3. Factory - Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.

Structural

1. Bridge - Decouple an abstraction from its implementation so that the two can vary independently.

2. Composite - Compose objects into tree structures to represent whole-part hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.

Behavioral

1. Command - Encapsulate a request as an object, thereby letting you parameterise clients with different requests, queue or log requests, and support undoable operations.

2. Chain of Responsibility - Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.

Clone this wiki locally