DESIGN PATTERNS

In software engineering, a design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.

Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved.

The
Gang of Four (GoF) patterns are generally considered the foundation for all other patterns. They are categorized in three groups:
1. Creational
2. Structural
3. Behavioral

Creational Patterns

Abstract Factory - Creates an instance of several families of classes

Builder - Separates object construction from its representation

Factory Method - Creates an instance of several derived classes

Prototype - A fully initialized instance to be copied or cloned

Singleton - A class of which only a single instance can exist

Structural Patterns

Adapter - Match interfaces of different classes

Bridge - Separates an object’s interface from its implementation

Composite - A tree structure of simple and composite objects

Decorator - Add responsibilities to objects dynamically

Facade - A single class that represents an entire subsystem

Flyweight - A fine-grained instance used for efficient sharing

Proxy - An object representing another object

Behavioral Patterns

Chain of Resp - A way of passing a request between a chain of objects

Command - Encapsulate a command request as an object

Interpreter - A way to include language elements in a program

Iterator - Sequentially access the elements of a collection

Mediator - Defines simplified communication between classes

Memento - Capture and restore an object's internal state

Observer - A way of notifying change to a number of classes

State - Alter an object's behavior when its state changes

Strategy - Encapsulates an algorithm inside a class

Template Method - Defer the exact steps of an algorithm to a subclass

Visitor - Defines a new operation to a class without change

Links:


Non-Software Examples of Software Design Patterns -
http://www2.ukdw.ac.id/kuliah/info/TR3063/NonSoftwareExamplesOfSoftwareDesignPatterns.pdf

Design Patterns, Pattern Languages, and Frameworks -http://www.cs.wustl.edu/~schmidt/patterns.html

Microsoft Application Architecture Guide 2.0 eBook -http://www.codeplex.com/AppArchGuide/Release/ProjectReleases.aspx?ReleaseId=20586

Design Patterns Sample Code (C++ & Java) - http://www.vincehuston.org/dp/

Microsoft Architecture Journal - http://msdn.microsoft.com/en-us/architecture/bb410935.aspx

Microsoft Architecture Journal Reader (Beta) -http://www.microsoft.com/downloads/details.aspx?FamilyID=dd466bbb-1b7d-438e-9f9a-954ce2058f15&displaylang=en

Microsoft’s Home for Design patterns & practices – http://msdn.microsoft.com/en-us/practices/default.aspx

Inject Some Life into Your Applications: Getting to Know the Unity Application Block - http://msdn.microsoft.com/en-us/library/cc816062.aspx

Design Patterns: Solidify Your C# Application Architecture with Design Patterns – http://msdn.microsoft.com/en-us/magazine/cc301852.aspx

C++ and the Perils of Double-Checked Locking Design Pattern -http://www.aristeia.com/Papers/DDJ_Jul_Aug_2004_revised.pdf

CSharp(C#) Design Patterns(with Sample Code) - http://www.dofactory.com/Patterns/Patterns.aspx

Java Design Patterns - http://www.patterndepot.com/put/8/JavaPatterns.htm

J2EE Patterns Catalog - http://java.sun.com/blueprints/patterns/catalog.html

J2EE Design Patterns - http://www.onjava.com/pub/a/onjava/2002/01/16/patterns.html

Gopalan Suresh Raj's blog - http://gsraj.tripod.com/