Get Started. It's Free
or sign up with your email address
Design Patterns by Mind Map: Design Patterns

1. Structural

1.1. Class

1.1.1. Adapter Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.

1.2. Object

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

1.2.2. Decorator Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.

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

1.2.4. Facade Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use. Simple Interface Hide complexity

1.2.5. Flyweight Use sharing to support large numbers of fine-grained objects efficiently.

1.2.6. Proxy Provide a surrogate or placeholder for another object to control access to it.

1.2.7. Adapter Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.

2. Creational

2.1. Lazy Initialization

2.2. Object Pool

2.2.1. used to manage the object caching

2.3. Utility

2.4. Class

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

2.5. Object

2.5.1. Singleton Highlander One instance only Borg Multiple instances sharing state Multiton One instance per key

2.5.2. Prototype Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.

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

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

2.6. Constructor

3. Categories

3.1. Creational

3.2. Structural

3.3. Behavioral

4. Disposing

5. Behavioral

5.1. Specification

5.2. Null Object

5.2.1. The intent of a Null Object is to encapsulate the absence of an object by providing a substitutable alternative that offers suitable default do nothing behavior.

5.3. Sentinel

5.4. Class

5.4.1. Template Method Define the skeleton of an algorithm in an operation, deferring some steps to client subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure. Concrete Methods Organizing Methods

5.4.2. Interpreter Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.

5.5. Object

5.5.1. 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.

5.5.2. Iterator Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.

5.5.3. Memento Without violating encapsulation, capture and externalize an object's internal state so that the object can be returned to this state later.

5.5.4. State Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.

5.5.5. Strategy Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from the clients that use it.

5.5.6. Visitor Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates. Single-Serving Visitor Hierarchical Visitor

5.5.7. Observer Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.

5.5.8. Mediator Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.

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