- Against the OO spirit and increase coupling which usually becomes hidden
- Classic Singleton approach is hard to unit test
- Classic Singleton Class is hard to be inherited
http://code.google.com/p/google-singleton-detector/wiki/WhySingletonsAreControversial
http://stackoverflow.com/questions/1020312/are-singletons-really-that-bad
http://misko.hevery.com/2008/08/17/singletons-are-pathological-liars/
http://misko.hevery.com/2008/08/21/where-have-all-the-singletons-gone/
http://sites.google.com/site/steveyegge2/singleton-considered-stupid
No comments:
Post a Comment