Design Patterns are the proven solution to the common development problems faced during the software designing. These are the suggested way to solve the problems by providing cleaner, robust and efficient framework.
Design Patterns can be grouped into different categories
Design Patterns can be grouped into different categories
- Creational Patterns
- Structural Patterns
- Behavioral Patterns
Creational Patterns
Creational design patterns are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation. The basic form of object creation could result in design problems or added complexity to the design. Creational design patterns solve this problem by somehow controlling this object creation. Creational design patterns are further categorized into Object-creational patterns and Class-creational patterns. Where, Object-creational patterns deal with Object creation and Class-creational deal with Class-instantiation.
- Abstract factory pattern: Creates an instance of several families of classes.
- Builder pattern: Separates object construction from its representation.
- Factory method pattern: Creates an instance of several derived classes.
- Lazy initialization pattern: Is used as tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed
- Prototype pattern: A fully initialized instance to be copied or cloned.
- Object pool pattern: Helps in avoiding expensive acquisition and release of resources by recycling objects that are no longer in use.
- Singleton pattern: A class of which only a single instance can exist.
Structural Patterns
Structural design patterns are design patterns that ease the design by identifying a simple way to realize relationships between entities.
- Adapter pattern: Match interfaces of different classes.
- Bridge pattern: Separates an object’s interface from its implementation.
- Composite pattern: A tree structure of simple and composite objects.
- Decorator pattern: Add responsibilities to objects dynamically.
- Facade pattern: A single class that represents an entire subsystem.
- Flyweight pattern: A fine-grained instance used for efficient sharing.
- Proxy pattern: An object representing another object.
Behavioral Patterns
Behavioral design patterns are design patterns that identify common communication patterns between objects and realize these patterns. By doing so, these patterns increase flexibility in carrying out this communication.
- Chain of responsibility pattern: A way of passing a request between a chain of objects.
- Command pattern: Encapsulate a command request as an object.
- Interpreter pattern: A way to include language elements in a program.
- Iterator pattern: Sequentially access the elements of a collection.
- Mediator pattern: Defines simplified communication between classes.
- Memento pattern: Capture and restore an object's internal state.
- Observer pattern: A way of notifying change to a number of classes.
- State pattern: Alter an object's behavior when its state changes.
- Strategy pattern: Encapsulates an algorithm inside a class.
- Template method pattern: Defer the exact steps of an algorithm to a subclass.
- Visitor pattern: Defines a new operation to a class without change.



