Singletons are overused and, except in rare instances, are a bad idea.
Singletons are acceptable if you're writing throwaway code, like agency stuff where getting it done under tight deadlines is more important than getting it done in the most scalable and flexible way.
A Singleton is just a global. IMO, globals are helpful when hacking, but generally bad practice. If it was called Globalton, people wouldn't think so highly of it just because it's a "Design Pattern". Most people misuse Singleton, anyway.
http://misko.hevery.com/2008/08/17/singletons-are-pathological-liars/ http://googletesting.blogspot.com/2008/05/tott-using-dependancy-injection-to.html http://googletesting.blogspot.com/2008/08/where-have-all-singletons-gone.html Google even has a tool that detects Singletons in Java so you can refactor them out. http://linux.softpedia.com/get/Programming/Quality-Assurance-and-Testing/Google-Singleton-Detector-29295.shtml _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

