Nice article, but adding Factory or Interface would have been a better choice than Singleton. Reason is that Singleton easily becomes an anti pattern: all too often programmers use it to easily access to all objects of a classes of which they only need one instance, effectively creating global variables. There are positive and negative consequences for each design pattern, which you’ve skipped over too easily here.