首页 | 本学科首页   官方微博 | 高级检索  
     

工厂模式辨析与应用研究
引用本文:吴清寿. 工厂模式辨析与应用研究[J]. 长春师范学院学报, 2011, 0(4): 30-33
作者姓名:吴清寿
作者单位:武夷学院数学与计算机系;
摘    要:通过使用工厂模式封装了易变对象,屏蔽了客户需求变化的负面影响,解决了客户和具体对象的紧耦合。本文讨论工厂模式中简单工厂模式、工厂方法模式和抽象工厂模式的基本结构,并对其适用场景和优缺点进行深入剖析。为进一步降低客户对工厂对象的依赖,用.NET中的反射机制和配置文件动态地创建工厂对象。

关 键 词:设计模式  工厂模式  设计原则  反射  配置文件

Analysis and Applied Research on Factory Patterns
WU Qing-shou. Analysis and Applied Research on Factory Patterns[J]. Journal of Changchun Teachers College, 2011, 0(4): 30-33
Authors:WU Qing-shou
Affiliation:WU Qing-shou(Department of Mathematics and Computer Science of Wuyi University,Wuyishan 354300,China)
Abstract:By the factory patterns,the volatile objects are sealed,negative impacts of changeable customer needs are shielded,and the problem of tightly coupling between customers and concrete objects is resolved.The basic structures of simple factory pattern,factory method and abstract factory pattern in the factory patterns are discussed.In-depth analysis on its applicability to scenes and advantage and weakness is also conducted.To further reduce customers' reliance on factory objects,factory objects are dynamicall...
Keywords:design pattern  factory pattern  design principles  reflection  configuration file  
本文献已被 CNKI 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号