Design Patterns: Singleton


This is the fifth of an eight part series where Robert is joined by Phil Japikse to discuss design patterns. A design pattern is a best practice you can use in your code to solve a common problem. In this episode, Phil demonstrates the Singleton pattern. This pattern restricts the instantiation of a class to one instance and provides global access to that instance.


– Sample code:
– Design Patterns: Elements of Reusable Object-Oriented Software book:
– Head First Design Patterns book:



  1. Full list for this series:
    0. SOLID Design Patterns (start from here):
    1. Design Patterns: Command/Memento:
    2. Design Patterns: Strategy:
    3. Design Patterns: Template Method:
    4. Design Patterns: Observer and Publish-Subscribe:
    5. Design Patterns: Singleton:
    6. Design Patterns: Factories:
    7. Design Patterns: Adapter and Façade:
    8. Design Patterns: Decorator:

  2. Thanks for this high quality series guys 🙂 Imho however this video needs more warnings. There are many who argue that *Singleton simply is bad practice*. Myself included. There's too much potential downside and not enough upside. For anyone interested I would recommend the Clean Code Talks by Miško Hevery or my video on Singleton. Clearly, people have different opinions, but I oppose usage of the static keyword altogether since it removes the object orientation from object oriented programming. Hence the Singleton pattern must also be opposed.

  3. Thanks for creating this awesome series!

    You should add part number in the title of the video. So it will be easier for us to find the first part of the series. If there's a playlist of this series, that'll be even more helpful!


Please enter your comment!
Please enter your name here