Does factory method pattern follow template pattern, and abstract factory pattern doesn't?
问题 In Design Pattern by Gamma et al, "Factory Method" has the following structure: "Abstract Factory" has the following structure: Why does Creator has a method AnOperation() to call FactoryMethod() in Factory Method pattern, while AbstractFactory doesn't have a method to call CreateProductA() and CreateProductB() in Abstract Factory pattern? Does Creator 's method AnOperation() calling FactoryMethod() follow the Template pattern, whose structure is ? 回答1: It's simple: given "first-order factory