Sunday, February 17, 2008

Design Patterns



Pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice.


Design pattern is a general reusable solution to a commonly occurring problem in software design.
There are three types of design patterns.
Those are
1. Creation Pattern: This pattern abstracts the instantiation process.
eg: Abstract Factory, Builder, Factory Method, Prototype and Singleton.
2. Structural Patterns: This pattern groups objects into larger structures.
eg. Adapter, Builder, Composite, Decorator, Facade, Fly-Weight and Proxy.
3. Behavioral Patterns: This pattern defines better communication among objects.
eg. Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Momento, Observer, State, Strategy, Template and Visitor,