Singleton Design Pattern Videos

Singleton Design Pattern is a part of Creational Pattern

  • We have to ensure  the class has only one instance, and provide a global point of access to it.
  • Encapsulated €œjust-in-time initialization € or €œinitialization on first use €.
To be considered for  Singleton Design Pattern
  • Define a private static attribute in the €œsingle instance € class.
  • Define a public static accessor function in the class.
  • Do €œlazy initialization € (creation on first use) in the accessor function.
  • Define all constructors to be protected or private.
  • Clients may only use the accessor function to manipulate the Singleton.    

Why to read, you can watch the below videos to understand Singleton  Design pattern and its implementations ?

About mohan

This is Mohan Jayapalan author of TechPages Blog.I am a part time blogger and Currently working for private Software Concern.

© Copyright 2010-2016 · All Rights Reserved · Powered by WordPress ·