design pattern notes [3] - factory
2012-12-13 09:54
357 查看
Factory method is virtual method to create local-specific object in the class hierarchy. The base class may or not implement it.
If a parameter is passed to create method to create product by calling its virtual methods.this isabstract factory. The client can get all components from abstract factory to assembly one product. The procedure is visible
to client.
If a parameter is passed to create method to create product in its entirely. This isbuilder. The client does not need to get any component from builder to assembly product. All components are inside of builder. Once done,
the client gets the final product.
If all components are passed as parameters to create method to build final product by copying these component. This isprototype.
If a parameter is passed to create method to create product by calling its virtual methods.this isabstract factory. The client can get all components from abstract factory to assembly one product. The procedure is visible
to client.
If a parameter is passed to create method to create product in its entirely. This isbuilder. The client does not need to get any component from builder to assembly product. All components are inside of builder. Once done,
the client gets the final product.
If all components are passed as parameters to create method to build final product by copying these component. This isprototype.
相关文章推荐
- design pattern notes [3] - factory
- design pattern notes [1] - Bridge and composite
- design pattern notes [7] - state,strategy,memento,mediator,and iterator
- design pattern notes [8] - interpreter, and command
- head first Design Pattern factory
- 1.接口与工厂 Interface and Factory of Design Pattern
- The Factory Design Pattern
- Design Pattern Abstract Factory
- design pattern notes [1] - Bridge and composite
- design pattern notes [7] - state,strategy,memento,mediator,and iterator
- 抽象工厂设计模式(Abstract Factory Design Pattern)简单随笔
- Abstract Factory Design Pattern for Dependency Injection
- [创建型模式系列]Abstract factory of Design Pattern模式设计之抽象工厂模式
- design pattern notes [2] - decorator, facade, Singleton, Flyweight, and Adapter
- 简单工厂设计模式(Simple Factory Design Pattern)
- Design Pattern Factory Method
- design pattern notes [2] - decorator, facade, Singleton, Flyweight, and Adapter
- 设计模式之 - 工厂方法模式 (Factory Method design pattern)
- [导入]Factory Method Design Pattern
- Factory Design Pattern Analogue(原创)