Singleton Pattern
Source:: Software Design Patterns - Best Practices for Software Developers
With the Singleton Pattern, we restrict the instantiation of certain classes to one single instance. This single instance is unmodifiable, and can be accessed globally throughout the application.
For example, we can have a Counter singleton, which contains a getCount, increment, and decrement method.

This singleton can be shared globally across multiple files within the application. The imports of this Singleton all reference the same instance.
The increment method increments the value of counter by 1. Any time the increment method has been invoked anywhere in the application, thus changing the value of counter, the change is reflected throughout the entire application.