Design Patterns

Design Patterns are just convenient ways of reusing object oriented code between projects and programmers. The idea behind design patterns is simple:
"Write down and catalog common interactions between objects that programmers have frequently found useful."
Some useful definitions of design patterns have emerged as the literature in this field has explained:
Design Patterns are recurring solutions to design problems you see over.

Design Patterns focus more on reuse of recurring architectural design themes, while frameworks focus on detailed design and implementation.

We can classify design pattern in to three categories:
  1. Creational Design Patterns
  2. Structural Design Patterns
  3. Behavioral Design Patterns
1. Creational Design Patterns:  All of the creational patterns define the best possible way in which an object can be instantiated. These describes the best way to create object instances.
Creational design patterns are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation. The basic form of object creation could result in design problems or added complexity to the design. Creational design patterns solve this problem by somehow controlling this object creation.
All the creational patterns define the best possible way in which an object can be created considering reuse and changeability. These describes the best way to handle instantiation. Hard coding the actual instantiation is a pitfall and should be avoided if reuse and changeability are desired. In such scenarios, we can make use of patterns to give this a more general and flexible approach.
Creational Patterns are of following types
a. Singleton Pattern
b. Factory Pattern
c. Factory Method Pattern
d. Abstract Factory Pattern
e. Builder Pattern
f. Prototype Pattern
g. Object Pool Pattern
    Blogger Comment
    Facebook Comment

1 comments: