Dofactory.com
Dofactory.com
 Back to list
Views:   14.7K
Replies:  1
Archived

Singleton pattern and DB Connection

Is it best to use the Singleton Design Pattern for database connections in web development? If not what is the best way to do it?
Madeshwaran Mohanraj, Feb 02, 2010
Reply 1
No it is not best pratice ..
Gulab Chand Tejwani, Feb 16, 2010
so the main question remains as it is "I was wondering why are Singletons not implemented as a static class with a static public Instance property?"
Apr 18, 2012
As per the technical description of static class, we can't create the instance of static class.
Feb 16, 2012
If we have static class then why do we need to creae instance..?
Mar 12, 2010
This is not correct. A class exist when called upon. This is what the static constructor is all about.
Feb 17, 2010
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.