1
Researching a little more about Singleton I found some comments in favor and against the use of this approach.
But I still doubt the usefulness of instantiating a single instance of a class (and doing it globally) in a web development scenario, where we should load this object between sessions.
In short my question would be, what advantage or what would make a programmer choose Singleton in a web development scenario, since there is no way to create global objects between sessions. Another approach would be to instantiate a class at login and load it into the global variables between pages.
Here in this specific scenario I refer to web development using php for example.
Related: https://answall.com/q/18860/57801
– Don't Panic