- 10
- 0
- 约5.06千字
- 约 19页
- 2017-07-03 发布于湖北
- 举报
DesignPattern概要1
Design Pattern-- Factory Model Contents 1.1 What is software design pattern A pattern is a solution to a problem in a context. In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design. 1.2 The development of design pattern Patterns originated as an architectural concept by Christopher Alexander. In 1987, Kent Beck and Ward Cunningham began experimenting with the idea of applying patterns to programming and presented their results at the OOPSLA conference that year. 1.3 The classification of design pattern GoF list 23 common design patterns and grouped into the three categories: creational patterns, structural patterns, and behavioral patterns. 1.4 Factory Model Factory model includes three design patterns: Simple Factory Factory Method Abstract Factory The relationship between them is showed in the graph. The details for the three patterns will be introduced in the followed parts. 2.1 The motivation of Simple Factory The factory create what you want, you just need to tell the name. 2.2 The structure of Simple Factory 2.3 The example of Simple Factory 2.4 the application and advantage Simple factory is applied in may places and it is widely used, but it is a good application when the subclass is limited, and the client don’t need to know the detail about how to create the production. Simple Factory Pattern provides a number of advantages. It provides an elegant way to abstract your code so there’s less visual clutter It allows you to introduce specialized, focused classes with a single purpose It makes the code more maintainable as there’s a single place where classes are instantiated, and each class serves a single purpose 3.1 The motivation of Factory Method In Simple Factory pattern, you have to modify you factory code when a new production added 3.2 The structure of Factory Method The participants classes in this pattern are: IProduct defines the interface for obje
您可能关注的文档
- DELL供应商管理流程.ppt
- Delicious Food in Hong kong.ppt
- DELL供应链管理.docx
- Dell switch vlan 划分及路由转发配置.docx
- Dell运作系统.ppt
- Delicious Food Around Us(我们身边的美食).ppt
- DELL服务器E2012 E2111内存故障解决图解.docx
- delmia初期培训 V1.0.ppt
- Delphi5 VCL结构.doc
- DEK印刷机操作编程.ppt
- Designing Marketing Programs (设计营销计划)凯勒 《战略品牌管理》课件.ppt
- Denmark_丹麦英文介绍.pptx
- Dental caries 留学生课.ppt
- description.ppt.ppt
- DESCRIPTION.pptx
- dessler_hrm12_tif01 人力资源1.doc
- Dessler_HRM12e_PPT_06人力资源管理.ppt
- Dessler_HRM12e_PPT_12人力资源管理.ppt
- deep reinforcement learning深度学习.pptx
- Developing a Persuasive Essay 如何写英文说服性短文.ppt
最近下载
- SYT 5216-2017 石油天然气工业 钻井和采油设备 钻井取心工具.docx VIP
- T_CPI 11037-2024 石油天然气钻采设备水力振荡器技术与应用规范.docx VIP
- 雪铁龙维修 手册 图DS_5LS_Owner_Book_ZH.pdf VIP
- 2025至2030药用真菌行业项目调研及市场前景预测评估报告.docx
- T_SCMES 24—2024(石油天然气钻采设备智能钻机).pdf VIP
- 财务共享模式下企业内部控制研究——以延长石油为例.docx VIP
- 财务共享延长石油集成方案.pdf VIP
- 世界著名谈判案例.docx VIP
- 2025《延安延长石油集团财务共享中心实施效果分析的案例报告》8200字.doc VIP
- 2025人教版音乐一年级下册全册教学设计教案.pdf
原创力文档

文档评论(0)