Behavioral Patterns

Chain of Responsibility Pattern
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. There is a potentially variable number of "handler" objects and a stream of requests that must be handled. Need to efficiently process the requests without hard-wiring handler relationships and precedence, or request-to-handler mappings.

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

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

Iterator Pattern
Provide an object which traverses some aggregate structure, abstracting away assumptions about the implementation of that structure.

Mediator Pattern
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.

Memento Pattern
Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later (undo by rollback).

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

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

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

Template Method Pattern
Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. TemplateMethod lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.

Visitor Pattern
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.

Creational Patterns

Abstract Factory Pattern
An AbstractFactory is a class that exists to create instances of another class.

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

Factory Method Pattern
Allows classes to defer object creation to a separate method (a FactoryMethod).

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

Structural Patterns

Adapter Pattern
Convert the interface of some class b into an interface a that some client class c understands. The AdapterPattern lets classes with incompatible interfaces work together. This is sometimes called a wrapper because an adapter class wraps the implementation of another class in the desired interface. This pattern makes heavy use of delegation where the delegator is the adapter (or wrapper) and the delegate is the class being adapted.

Bridge Pattern
Decouples an abstraction from its implementation so that the two can vary independently.

Composite Pattern
Compose objects into tree structures that represent whole-part hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly. A leaf has the same interface as a node.

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

Facade Pattern
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. This can be used to simplify a number of complicated object interactions into a single interface.

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

Model-View-Controller Pattern
The Model-View-Controller (MVC) Pattern decouples data access and business logic from data presentation and user interaction by introducing an intermediate component: the controller.

Proxy Pattern
Simply speaking, a Proxy object is one through which we control access to the actual object on which the functionality lies.

Singleton Pattern
The Singleton Pattern ensures a class has only one instance, and provides a global point of access to it.

There are currently no attachments on this page.

Labels:

Enter labels to add to this page:
Wait Image 
Tip: Looking for a label? Just start typing.