Skip to content

Creational Pattern

August 7, 2009
tags:

Creational Pattern is about creating instance for an interface class. If we are creating n instance in n Concrete class of our application, each instance occupy the application memory required, nevertheless the instance is used or not, which reduces application performance and increases the memory usage. This category makes us to create all the required n instance in an interface class and that interface is implemented in the n concrete classes, now n instance is available for n concrete classes. Main objective of creational pattern is to create all the instances in interface class and let the concrete classes will have access to it. So there is no need of creating any unwanted instance inside the class. Developers to make sure that object is not used any more with in the class then it should be released and instance should be created only when needed.


Some of the creational pattern are:
Abstract Factory, Factory Method, Builder, Lazy Initialization, Object pool, Prototype,  Singleton.
Singleton is commonly used creational pattern which will have only one instance for a class.
Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: