Singleton is also called as Anti-Pattern, why ?

 Posted by Akiii on 1/16/2012 | Category: Design Pattern & Practices Interview questions | Views: 3120 | Points: 40

It's very hard to create a subclass, or to create a mock object for a Singleton class. Singleton makes the unit testing harder. Singleton hide the dependencies and make the classes tightly coupled with each other.

For the above reasons, Singletons are called as Anti-Pattern.

Thanks and Regards

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response