SoC and the Apex Common Library Tutorial Series Part 3: The Factory Method Pattern
What is the Factory Method Pattern? The factory method pattern allows you to create objects (or instantiate classes) without having to specify the exact class that is being created. Say for instance you have a service class that can be called by multiple object types and those object types each have their own object specific…