The singleton design pattern is useful when you need to create only one object or you need some sort of object capable of maintaining a global state for your program.
Other possible use cases are:
- Controlling concurrent access to a shared resource. For example, the class managing the connection to a database.
- A service or resource that is transversal in the sense that it can be accessed from different parts of the application or by different users and do its work. For example, the class at the core of the logging system or utility.