全屏浏览
缩小浏览
回到页首

04 2018 档案

摘要:抽象工厂模式(Abstract Factory Pattern)是一种比较常用的模式,其定义如下:Provide an interface for creating families of related or dependent objects without specifying their c 阅读全文
posted @ 2018-04-21 09:52 huhx 阅读(619) 评论(0) 推荐(0) 编辑
摘要:模板方法的定义:Define the skeleton of an algorithm in an operation,deferring some steps to subclasses.TemplateMethod lets subclasses redefine certain steps o 阅读全文
posted @ 2018-04-21 09:38 huhx 阅读(591) 评论(0) 推荐(0) 编辑
摘要:享元模式(Flyweight Pattern)是池技术的重要实现方式,其定义如下:Use sharing tosupport large numbers of fine-grained objects efficiently.(使用共享对象可有效地支持大量的细粒度的对象。) 享元模式的使用 享元模式 阅读全文
posted @ 2018-04-18 20:14 huhx 阅读(875) 评论(0) 推荐(0) 编辑
摘要:桥梁模式(Bridge Pattern)也叫做桥接模式,是一个比较简单的模式,其定义如下:Decouple an abstraction from its implementation so that the two can vary independently.(将抽象和实现解耦,使得两者可以独立 阅读全文
posted @ 2018-04-18 20:09 huhx 阅读(342) 评论(0) 推荐(0) 编辑
摘要:适配器模式(Adapter Pattern)又叫做变压器模式,也叫做包装模式(Wrapper),但是包装模式可不止一个,还包括装饰模式。它的定义如下:Convert the interface of a class into another interface clients expect.Adap 阅读全文
posted @ 2018-04-18 20:07 huhx 阅读(449) 评论(0) 推荐(0) 编辑
摘要:命令模式是一个高内聚的模式,其定义为:Encapsulate a request as an object,thereby letting you parameterize clients with different requests,queue or log requests,and suppo 阅读全文
posted @ 2018-04-18 19:29 huhx 阅读(667) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示