GoF Patterns Reference


Abstract Factory
Used to identify an interface for creating families of related or dependent objects without specifying their concrete classes.

Used to separate the construction of a complex object from its representation so that the same construction process can create different representations.

Factory Method
Used to identify an interface for creating an object, but having the subclasses be responsible for the instantiation of a class.

Used to specify the kinds of objects that are to be created using a prototypical instance, and allow new objects to be created by copying this prototype.

Used to ensure a class has only one instance, and to provide a global point of access to it.


Used to convert a class interface into another class interface.

Used to decouple an abstraction from its implementation so that the two can vary independently.

Used to compose objects into tree structures for representing part-whole hierarchies.

Used to dynamically attach additional responsibilities to an object.  This is an alternative to subclasses.

Used to dynamically attach additional responsibilities to an object.  This is an alternative to subclasses.

Used to share a large volume of small objects efficiently.

Used to provide a surrogate or placeholder for another object to control access to it.


Chain of Responsibility
Used to avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request.

Used to encapsulate a request as an object.

Used to define a grammar for simple languages, to represent sentences in that language, and to interpret those sentences.

Used to provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.

Used to 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.

Used to capture and externalize an objects internal state without violating encapsulation so that the object can be restored to this state later.

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

Used to allow an object to alter its behavior when its internal state changes so that the object appears to change its class.

Used to define a family of algorithms, encapsulate each one, and make them interchangeable.

Template Method
Used to define a skeleton of an algorithm in operation, deferring some steps to subclasses.

Used to define a new operation to be performed on the elements of an object structure without changing the classes of the elements.

Reference table text provided by Paul Gustavson

No comments yet... Be the first to leave a reply!

Leave a Reply

Stop censorship