The singleton pattern is one of the most controversial yet easiest to implement design patterns. Many people say you should never use the singleton design pattern, but there are still plenty of cases where the singleton pattern is the perfect solution. In this video I will explain what the singleton pattern is, when you should and should not use it, and go over an example of refactoring some code to use the singleton pattern.
Design Pattern Playlist:
http://bit.ly/2QrGnDq
Design Pattern Repository:
https://github.com/WebDevSimplified/Design-Patterns
Twitter:
https://twitter.com/DevSimplified
GitHub:
https://github.com/WebDevSimplified
CodePen:
https://codepen.io/WebDevSimplified
#SingletonPattern #DesignPatterns #Programming