Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7193466
  • 博文数量: 510
  • 博客积分: 12019
  • 博客等级: 上将
  • 技术积分: 6836
  • 用 户 组: 普通用户
  • 注册时间: 2005-08-01 16:46
文章分类

全部博文(510)

文章存档

2022年(2)

2021年(6)

2020年(59)

2019年(4)

2018年(10)

2017年(5)

2016年(2)

2015年(4)

2014年(4)

2013年(16)

2012年(47)

2011年(65)

2010年(46)

2009年(34)

2008年(52)

2007年(52)

2006年(80)

2005年(22)

分类: 项目管理

2006-07-26 15:58:39

GRASP模式——面向对象的基本设计模式
作者: 发文时间:2004.08.28 来源:CSDN
  【安全专区】        【IT博客】 

GRASP模式:

五个基本模式:Information Expert, Creator, High Cohesion, Low Coupling, and Controller

四个扩展模式:PolymorphismIndirection Pure Fabrication Protected Variations

l         High Cohesion, Low Coupling——高聚合,低耦合是面向对象的最高原则!

l         Polymorphism ——Adapter, Command,Composite, Proxy, State, and Strategy模式其实都使用多态来实现。

l         Pure Fabrication——行为对象,功能为中心的对象。Adapter, Strategy, Command都是这一模式的具体实现。

l         Indirection——“计算机领域的大多数问题都能通过引入中间层加以解决” Adapter, Bridge, Facade, Observer, Mediator,都是具体实现。

l         Protected Variations——隔离封装变化。将变化,不确定的东西用稳定不变的接口封装隔离保护起来。信息隐藏和开闭原则和PV具有相同的含义

阅读(2837) | 评论(0) | 转发(0) |
0

上一篇:C++设计模式

下一篇:多态(Polymorphism)

给主人留下些什么吧!~~