Wednesday, September 21, 2011

What are Design Patterns & Types.

What are Design Patterns:


             Design patterns are optimized, reusable solutions to the programming problems that we encounter every day. These defined originally by the Gang of Four programmers. Design patterns can be use in any programming language as these are not language specific. 
          A design pattern in architecture and computer science is a format way of documenting a solution to a design problem in a particular field of expertise.


Depending upon the nature of design these are divided into three different groups. 

  • Creational : These patterns provide instantiation mechanisms, making it easier to create objects in a way that suits the situation. 
    • Factory Method
    • Abstract Factory
    • Singleton
    • Builder
    • Prototype
  • Structural : These patterns generally deal with the relationship between entities, making it easier for these entities to work together. 
    • Adapter
    • Bridge
    • Composite
    • Decorator
    • Facade
    • Proxy
    • Flyweight
  • Behavioral : These patterns are used in communications between entities and make it easier and more flexible for these entities to communicate.
    • Chain of Responsibility
    • Command
    • Iterator
    • Interpreter
    • Mediator
    • Memento
    • Observer
    • State
    • Strategy
    • Visitor
    • Template Method
References: Design Pattern