What is the applicability of the Singleton Design Pattern

Posted by Akiii under Design Pattern & Practices on 1/9/2012 | Points: 10 | Views : 2067 | Status : [Member] | Replies : 2
What is the applicability of the Singleton Design Pattern ?

I have read this pattern which tells that one and only one instance can be created. Now how can i make this pattern useful in real life programming ?
What real life programming scenarios is needed to apply this design pattern ?

Any help is appreciated !

Thanks and Regards
Akiii




Responses

Posted by: Pgayath on: 10/9/2012 [Member] Starter | Points: 25

Up
0
Down
Akii:
Singleton pattern can be used when you want to have the control on the instances created for the classes used.
Eg: Singleton pattern can used for Error logging classes, Email classes, Configuration classes

Thanks and Regards,
Gayathri P

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gaur1982 on: 10/9/2012 [Member] Starter | Points: 25

Up
0
Down
For a great Explanation of Singleton Design Pattern
Check this URL : http://planetofcoders.com/explain-singleton-pattern/

Gaurav Agrawal
http://www.planetofcoders.com/

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response