Friday, September 5, 2008

Creational patterns

Creational pattern as the name implies are concerned with the creation of object.
The patterns help you build a part of an application that hides how an object is created and composed from the representation of the object. The only information known of the object is its interface. Creational patterns can be divided in :
1. class creational patterns
2. object creational patterns.
The difference lies in that the class creational patterns use inheritance to instantiate a class, while object creational patterns delegate the instantiation to another object.

All creational patterns hide which concrete class is used by the system and, further more they hide how an object is created and put together.
They increase the system’s flexibility in terms of the what, who, how, and when of object creation.
Creational patterns can be divided into :
1. Singleton
2. Factory
3. Abstract factory
4. Builder
5. Prototype

No comments: