← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 1841.h.1.a.1.a.3.f.1.a.2.a

内聚度指标辅助拆分

理解等级:中级

LCOM衡量类或组件中方法与数据关联不足的程度,有多个具体变体。缺乏内聚的共享类可能原本就包含多个职责,适合拆分;低LCOM则不直接说明应该共享或复制。指标提供候选线索,最终仍须结合语义与真实使用者判断。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Building Evolvable Architectures · 查看原书依据

      Architects don’t have many useful code-level metrics, but here is a rare handy one. The Chidamber & Kemerer metrics suite includes useful metrics for determining whether a module is a good candidate to split or whether architects should use an approach called LCOM (Lack of Cohesion in Methods). LCOM measures structural cohesion in classes or components and exists in several different variants (LCOM1, LCOM2, etc.)

    参考来源

    - 位置:《Building Evolutionary Architectures Automated Software Governance, 2nd Edition》第07章《Building Evolvable Architectures》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Building Evolutionary Architectures Automated Software Governance, 2nd Edition/_epub-src/OEBPS/ch07.html;段落定位:LCOM measures structural cohesion) - 结论依据:原文对“内聚度指标辅助拆分”的定义或案例,支撑“LCOM衡量类或组件中方法与数据关联不足的程度,有多个具体变体”的归纳。据其上下文,缺乏内聚的共享类可能原本就包含多个职责,适合拆分;低LCOM则不直接说明应该共享或复制。 - 原始内容:Architects don’t have many useful code-level metrics, but here is a rare handy one. The Chidamber & Kemerer metrics suite includes useful metrics for determining whether a module is a good candidate to split or whether architects should use an approach called LCOM (Lack of Cohesion in Methods). LCOM measures structural cohesion in classes or components and exists in several different variants (LCOM1, LCOM2, etc.)