Creational Design Patterns

singleton-design-pattern

singleton design pattern

This design pattern provides the way to create an object of a class as per your project requirement. It means you can control the creation and life cycle of an object in your application.  As we have already discussed about different creational design patterns in my previous post, lets have a recall about  the creational patterns as below and then we will discuss different types of creational patterns in this post later.

1. Creational Design  Patterns

  • Singleton Design Pattern

Singleton Design Pattern ensures that a class has only one instance in a application, and it provides only one point of access (a global point of access) to access the running instance of the object.

  • Factory Pattern

Factory Pattern ensures that you can create an object of a class by using a factory method (a static method) instead of using new operator, so that you can control all objects and memory used by that particular objects.

  • Abstract Factory Pattern

Abstract Factory Pattern is a set of factory classes from which we can use/implement new factory classes as per our requirements. Then we can derive a new class form newly created factory classes instead of directly derived it from Abstract Factory class.

  • Builder Pattern

Builder pattern insure that, when we create a complex object, It uses step by step creation process and the final step returns the object of the class.

  • Prototype Pattern

Prototype Pattern insures the cloning properties of an object. The cloned object might be different from the original object. For example you might copy a document from your friend and change some points as per your requirement.

-> Please click on Next Page button below for read details on different type of creational design patterns. We will discuss Singleton Design Pattern in the next page and so on.

 

Post By SmrutiRanjan (57 Posts)

Working @ Samsung as a Project Lead for Android Smartphones. I have been blogging since 2008. Previously I was writing articles for other bloggers, but finally I have started my own blog-"Techblogon".I am also an active contributor for the blog-"Gadgets n Gizmos World". Job is my necessity, but blogging is my passion.

Website: → Techblogon

Connect

Leave a Reply

Your email address will not be published. Required fields are marked *


5 + = ten

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">