2007/03 4
* 为显示世界中的对象建模
* 为[[抽象]]的对象建模
* 降低[[复杂度]]
* 隔离复杂度
* 隐藏实现细节
* 限制变动的影响范围
* 隐藏全局数据
* 让参数传递更顺畅
* 建立中心控制点
* 让代码更易于重用
* 为程序族作计划
* 把相关操作包装到一起
* 实现某种特定的[[重构]]

应该避免的类
* 避免创建万能类
* 消除无关紧要的类 (降级为其他类的成员)
* 避免用动词命名的类 (降级为其他类的子程序)

知识来源: 《代码大全2》 P152-156
Defined tags for this entry:

Posted by rollenc

0 Trackbacks

  1. No Trackbacks

0 Comments

Display comments as(Linear | Threaded)
  1. No comments

Add Comment


You can use [geshi lang=lang_name [,ln={y|n}]][/lang] tags to embed source code snippets
E-Mail addresses will not be displayed and will only be used for E-Mail notifications