Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Simple Factory ====== ====== Factory Method ====== UML Code (PlantUML) <code> @startuml Product <|-- ConcreteProduct Creator <|-- ConcreteCreator ConcreteCreator ..> ConcreteProduct class Creator { {abstract} fabricmethod() oneOperation() } class ConcreteCreator { fabricmethod() } @enduml </code> {{:designpatterns:factorymethod.png?200|}} ===== Advantages ===== * No new operator is called by calling classes -> better to exchange implementation later * Better name for virtual constructor ===== Disadvantages ===== * Creation of sub classes * Add. class which contains class method for creation necessary ====== Abstract Factory ====== design_patterns/factorymethod.txt Last modified: 2017/02/19 14:47by phreazer