I\'m new to design patterns and I cant really see a difference between this two patterns, both are creational patterns arent they? and what is the purpose of each pattern? t
The Singleton pattern ensures that only one instance of the class exists and typically provides a well-known, i.e., global point for accessing it.
The Factory pattern defines an interface for creating objects (no limitation on how many) and usually abstracts the control of which class to instantiate.