知识卡片
用语句量识别组件异常
组件尺寸可用命名空间内所有源码语句数之和近似,优于受个人编程风格影响很大的文件数、类数或物理行数。清单同时记录可识别职责的名字、稳定命名空间、语句数、占全库比例和文件数。异常大提示职责过多或复杂,但只有存在清楚子领域才按职责拆;不能为凑均匀尺寸任意切割。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 基于组件的分解模式 · 查看原书依据
One metric we’ve found useful for component sizing is calculating the total number of statements within a given component (the sum of statements within all source files contained within a namespace or directory).
参考来源
- 位置:《Software Architecture: The Hard Parts》第5章《基于组件的分解模式》(来源项目:book-sources;源文件:extracted/Software Architecture The Hard Parts Modern Trade-Off Analyses for Distributed Architectures (Neal Ford, Mark Richards, Pramod Sadalage etc.)/_epub-src/OEBPS/ch05.xhtml)
- 结论依据:原文的定义、比较或案例支持“组件尺寸可用命名空间内所有源码语句数之和近似,优于受个人编程风格影响很大的文件数、类数或物理行数”;正文据此解释其用途与适用边界。
- 原始内容:One metric we’ve found useful for component sizing is calculating the total number of statements within a given component (the sum of statements within all source files contained within a namespace or directory).