Is there any point in the globals or “evil” monophonic

I previously used Singletons for global classes, if absolutely necessary, that is, a log, error handling. But now I use unit testing that they don’t like!

I would like to ask a basic question about global signs. What is the point of them? What happened to creating a new instance of the class when you need it?

+3
source share
2 answers

It’s true, sometimes singletones can create problems that you won’t have without them.

I am trying to give you a list of my thoughts on this subject:

  • , . SOA, , .

  • , .

  • Singleton, . , , .

- , . AS3 . , , , . , , .

+3

SO-: ?

, , , / , - .

, , , , , .

+4

Source: https://habr.com/ru/post/1789728/


All Articles