Categories

Oct 17, 2019 in Design Patterns
Q: What are the drawbacks of using singleton design pattern?

1 Answer

Oct 18, 2019
The major drawbacks of using singleton design pattern are:

a)Singleton causes code to be tightly coupled. The singleton object is exposed globally and is available to a whole application. Thus, classes using this object become tightly coupled; any change in the global object will impact all other classes using it.

b)They hide dependencies instead of exposing them.

c)Singleton Pattern does not support inheritance.

d)Singleton principle can be violated by techniques such as cloning. If an application is running on multiple JVM’s, then, in this case, Singleton might be broken.
Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

Madanswer
Oct 16, 2019 in Design Patterns
Oct 16, 2019 in Design Patterns
Oct 17, 2019 in Design Patterns
...