- 4
- 0
- 约1.34万字
- 约 65页
- 2020-10-22 发布于湖南
- 举报
chapter 5 设计单入口和单出口的模块 符合结构化程序设计的思想 应避免病态连接和内容耦合。 “一个功能一个模块”→提高软件的可读性和可理解性。 有效阻断“涟漪效应(ripple effect)” →提高软件的可靠性和可维护性。 chapter 5 设计功能可以预测的模块 “可以预测”——模块的输入和输出之间的关系比较简单。 功能可以预测的模块:如果一个模块可以当作一个“黑盒子(Black Box)”来对待,对于该模块的输入数据来说,可以在不考虑其内部处理细节的情况下生成输出数据。 模块功能应该可以预测,但不要过分受其局限。 chapter 5 Exception Identification and Handling 例外识别和处理 Typical exceptions典型的例外 Failure to provide a service无法提供某种服务 Providing the wrong service or data提供了错误的服务或数据 Corrupting data破坏性的数据 Three ways of handle exceptions三种方法 Restoring and retrying恢复系统+重试 Restoring and correcting恢复系统+改正 Restoring and reporting恢复系统+报告 Defensive design
原创力文档

文档评论(0)