The Factory pattern has been one of the most fundamental design patterns in software development since the Gang of Four popularised it decades ago.