CREATIONAL DESIGN PATTERNS

Design patterns are mostly “evolved” rather than “discovered”. None of these patterns force you anything in regard to implementation; they are just guidelines to solve a particular problem , in a particular way ,in particular contexts. Code implementation is developers responsibility.

Creational patterns define the best possible way in which an object can be instantiated. These describes the best way to CREATE object instances.”

Their are different ways that an object can be created.The most commonly know way of creating an object is using the new keyword.

Book book = new Book ();

The new Operator creates the instance of an object, but this is hard-coding.

While coding, hard coding is the last thing one should do. Also, at times the very nature of the object which is created can change according to the nature of the program. In such scenarios, we can make use of patterns to give this a more general and flexible approach.

Types of Creational Design Patterns

 

   

Comments are closed