Chinaunix首页 | 论坛 | 博客
  • 博客访问: 258303
  • 博文数量: 60
  • 博客积分: 1222
  • 博客等级: 少尉
  • 技术积分: 585
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-16 17:28
个人简介

从学通信的博士到从事IT行业的工程师 从原华为项目经理,到现任职公司架构师

文章分类

全部博文(60)

文章存档

2013年(18)

2012年(42)

我的朋友

分类: 项目管理

2012-12-24 20:56:30

State allows the object alter its behavior when its internal state changes. This pattern avoids large, multipart conditional statements. It also introduces more classes.
The transition between states is implemented in the subclasses of State.

I think strategy is like visitor. Review it!

The memento does not break encapsulation. It stores snapshot of internal states of an Originator so that the Originator can restore its previous state when a caretaker lets it do that. The caretaker does not know how the memento save Originator's state. It just requests the Originator to store states to or restore states from the memento respectively. The memento simplifies the Originator although sometimes it is expensive.

Mediator encapsulates how a set of objects interact. It promotes loose coupling by keeping objects from referring to each other explicitly.  It is amazing to find that c++ begins to behave like that most of c source codes do.
It centralizes CONTROL!

Iterator provides a way to access an aggregate object sequentially without exposing its underlying representation.

阅读(1095) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~