Wednesday, June 18, 2008

Design Patterns

Patterns support reuse of software architecture and design

Creational Patterns
Factory Method – Method in a derived class creates associates
Abstract Factory – Factory for building related objects
Builder – Factory for building complex objects incrementally
Prototype – Factory for cloning new instances from a prototype
Singleton - Factory for a singular (sole) instance

Structural Patterns
Adapter – Translator adapts a server interface for a client
Bridge - Abstraction for binding one of many implementations
Composite – Structure for building recursive aggregations
Decorator – Decorator extends an object transparently
Facade – Facade simplifies the interface for a subsystem
Flyweight – Many fine-grained objects shared efficiently
Proxy – One object approximates another

Behavioral Patterns
Chain of Responsibility – Request delegated to the responsible service provider
Command – Request as first-class object
Interpreter – Language interpreter for a small grammar
Iterator – Aggregate elements are accessed sequentially
Mediator – Mediator coordinates interactions between its associates
Memento – Snapshot captures and restores object states privately
Observer – Dependents update automatically when a subject changes
State – Object whose behavior depends on its state
Strategy – Abstraction for selecting one of many algorithms
Template Method – Algorithm with some steps supplied by a derived class
Visitor – Operations applied to elements of an heterogeneous object structure

No comments: