Factory mehod and Abstract fatory
来源:互联网 发布:acrobat xi pro mac 编辑:程序博客网 时间:2024/06/06 04:03
Both of them are three elements: product, factory,and client.
Factory method pattern:
1. There is only one abstract product which can derive many concrete products.
2. There is only one abstract factory which can derive many concrete factories. One abstract factory can derive many concrete factories. Every factory class can manufacture only one product.
Abstract factory pattern:
1. There are many abstract products, and every abstract class can derive many concrete products.
2. There is only one abstract factory which can derive many concrete factories. One abstract factory can derive many concrete factories. Every factory can manufacture many products.
Difference:
1. Factory method has only one abstract product , while abstract factory have many abstract products.
2. The factory of Factory method can manufacture only one product. while the abstract factory can manufacture many products.
- Factory mehod and Abstract fatory
- 设计模式factory method; abstract fatory; builder ; prototype
- Understanding Factory Method and Abstract Factory Patterns
- 设计模式(3) 工厂方法(Factory Mehod)
- Abstract Factory
- abstract factory
- Abstract Factory
- Abstract Factory
- abstract factory
- Abstract Factory
- Abstract Factory
- Abstract Factory
- Abstract Factory
- Abstract Factory
- Abstract Factory
- Abstract Factory
- abstract factory
- abstract factory
- Important FAQ questions for WPF and Silverlight - Part 2
- OVERVIEW OF EJB
- FreeBSD 5.0RC1下安装Oracle 9i[总结]
- new 操作符所执行的工作和类型安全总结
- 做喜欢做的事,做最擅长的事
- Factory mehod and Abstract fatory
- 感悟父爱
- 登月40周年纪念
- HTML 事件解说之一 text 文本框
- Important FAQ questions for WPF and Silverlight - Part 3
- Spring学习笔记2--反向控制(IoC)的例子
- 遥控模型车入门知识
- 读《自己动手写操作系统》(四)
- 测试版的图象识别基本搞出来了,写的之烂(C++)