原帖由 eastlion 于 2005-11-7 12:00 发表
Design Pattern : too much for theroy
In the reality , only a few of them can apply for large applications.
原帖由 NNP 于 2005-11-7 12:39 发表
OCP DIP 解释有问题吧
我认为OCP 的意思是去电子娱乐室有各种各样的娱乐机器,有各种各样的娱乐节目,你可以玩他们,但是你不能又要玩玩不爽了,丁咣揣几脚试图改变他们让他们把你的游戏币吐出来。
DIP 有2层意思:
A: 在company,Manager不应该依赖于群众干活不能听从群众意见,应该听董事长的(董事长是个抽象class),
B:抽象的类不应该听有具体打算的类,有具体打算的类应该听从抽象的类。
原帖由 小小杨杨 于 2005-11-7 21:33 发表
Open Closed Principle OCP:
A module should be open for extension but closed for modification.
就像升级电脑一样,我们要拨号上网就插一张内置Modem;我们要用电脑看电视就插一张电视卡;我们要联网玩游 ...
欢迎光临 新西兰天维网社区 (http://bbs.skykiwi.com/) | Powered by Discuz! X2 |