Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
“模块化”的有效性取决于将系统划分为模块时使用的标准。
我想要的是,提出一些可用于将系统分解为模块的标准。
内聚力:模块中的功能是相关的。
低耦合:模块之间的依赖性最小。
协调的生命周期:模块内功能的更改往往同时发生。通常是高凝聚力的结果。
我认为单一职责原则将是一个很好的指南。尽量为每个模块定义职责,让每个模块对自己的事情负责。
见http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
阅读也很有趣:http ://www.cs.umd.edu/class/spring2003/cmsc838p/Design/criteria.pdf
这是一个非常古老的问题。