所有的design pattern都是遵循一些design
principle的,这些design principle的不同组合造就了不同的design pattern。所以,要掌握design
pattern,就要熟悉这些design principle,并能自如的组合它们。
Design Principle:(不断更新中)
1. Identify the aspects of your application that vary and separate them from what stays the same.
2. Program to an interface, not an implementation.
3. Favor composition over inheritance.
4. Strive for loosely coupled designs between objects that interact.
5. Classes should be open for extension, but closed for modification.
6. Depand upon abstraction. Do not depend upon concrete classes.
Design Principle:(不断更新中)
1. Identify the aspects of your application that vary and separate them from what stays the same.
2. Program to an interface, not an implementation.
3. Favor composition over inheritance.
4. Strive for loosely coupled designs between objects that interact.
5. Classes should be open for extension, but closed for modification.
6. Depand upon abstraction. Do not depend upon concrete classes.
发表评论
- 浏览: 142226 次
- 来自: 上海交通大学软件学院

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
另一只眼看Eclipse,所谓 ...
其他不管你学什么都会遇到一定的困惑的,一定的。
-- by mylvan -
我的第一关rake文件
robbin 写道每次当我想操起ruby写rake file的时候,都发现我三行 ...
-- by rubynroll -
我的第一关rake文件
抛出异常的爱 写道rake是建表结构的....不是用来导数据的 不如用exce ...
-- by liusong1111 -
我的第一关rake文件
不知大家有没有这种需求,用户的日常操作中,原始数据可能是其他人员发给他的exce ...
-- by zengyinbo -
使用ruby生成zip文件
如果已经拿到了csv文件,就用OO转成Excel成么? ---非程序员思路
-- by lgn21st






评论排行榜