In accordance with the principle of single responsibility :
Each class should be responsible for one part of the functionality provided by the software.
Singleton prevents the creation of multiple instances of a class, providing global access to it.
But this functionality has nothing to do with the actual functionality of the class and what it should provide.
Does this mean that the Singleton pattern violates SRP?
The short answer is NO for most cases. Again, this may depend on the implementation of Singleton.
, , , . , , . , /.
. . Singleton , , DB. Singleton , .
Source: https://habr.com/ru/post/1611835/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1611830/how-to-get-the-cloudwatch-agent-and-metric-filters-to-report-dimensions&usg=ALkJrhjV7JqihM0tQPIYvB1SbSqgS66rhQThe preferred way to express wildcard negative numeric literals is c ++Map border borders ggmap - rTwo-tag script script opens two windows - c #What is the best way to express a template literal? - c ++Socket.io events are fired several times when Angular.js changes - javascriptIs template bloated code still relevant with the latest compilers / linkers - c ++Separate data according to position vector - rTwilio Error 11200, Bad Gateway 502 - Intermittent Release - twilioДоступ к службе REST службы WCF через IIS с использованием CORS работает локально, но не с подключенного устройства - c#All Articles