• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
山高我为峰
博客园    首页    新随笔    联系   管理    订阅  订阅
2016年5月14日
组合模式
摘要: 组合模式的定义: 主要用来描述部分和整体的关系,其定义如下: Compose objects into tree structure to represent part-whole hierarchies. Composite lets clients treatindividual objects 阅读全文
posted @ 2016-05-14 19:11 山高我为峰 阅读(219) 评论(0) 推荐(0)
访问者模式
摘要: 访问者模式是一个相对简单的模式,其定义如下: Represent an operation to be performed on the elements of an object structrue. Visitor lets you define a new operation without 阅读全文
posted @ 2016-05-14 17:37 山高我为峰 阅读(246) 评论(0) 推荐(0)
备忘录模式
摘要: 备忘录模式提供了一种弥补真实世界缺陷的方法,让“后悔药”在程序世界中可行,其定义如下: Without violating encapsulation, capture and externalize an object's internal state so that the object can 阅读全文
posted @ 2016-05-14 16:14 山高我为峰 阅读(269) 评论(0) 推荐(0)
门面模式
摘要: 门面模式也叫做外观模式,是一种比较常用的封装模式,其定义如下: Provide a unifield interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes 阅读全文
posted @ 2016-05-14 14:22 山高我为峰 阅读(344) 评论(0) 推荐(0)
观察者模式
摘要: 观察者模式又叫发布订阅模式,其定义如下: Define a one-to-money dependency between objects so that when one object changes state,all its dependents arenotified and updated 阅读全文
posted @ 2016-05-14 13:54 山高我为峰 阅读(308) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3