Skip to content

Six Real-world Examples of Singleton Pattern

19 Jul, 12

Singleton Pattern:  Ensure a class has only one instance, and provide a global point of access to it.

Typical Real World Uses:

  1. “Score” class in game development to keep track of score of teams
  2. “HitCounter” class for a web application
  3. “MainController” class for an application
  4. “Logger” class which is used for logging in different sources
  5. “LoadBalancer” class in application
  6. “ConfigurationSettings” class which provides the configuration for an application



From → Design Patterns

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: