|
|
|
|
|
by jmartinpetersen
1706 days ago
|
|
It starts with the Singleton and vaguely hints that it has some drawbacks. Why start with that, then? And why not flat our recognise that it is understood more as an anti-pattern these days? I don't get blogs like these. This story has been told a million times with more or less the same content and structure. |
|
There might be significant tradeoffs with singletons, but I wouldn't go as far as claiming they are an anti-pattern. Far from it. Managing and sharing a single instance across the whole application is a critical part of other basic software architecture constructs like dependency injection or even handing app settings.