知识卡片
依赖规则可进入持续构建
分层架构若规定控制层只能经服务层访问持久层,就可把允许依赖方向写成构建期检查。原书用 ArchUnit 和 NetArchTest 举例阻止越层引用。这类检查能在代码评审前暴露结构偏离;具体层次名称与许可方向应来自当前系统的架构决策,而不是套用示例代码。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Measuring and Governing Architecture Characteristics · 查看原书依据
the architect defines the desirable relationship between layers and writes a verification fitness function to govern it.
参考来源
- 位置:《Fundamentals of Software Architecture》第08章《Measuring and Governing Architecture Characteristics》(源文件:`OEBPS/ch06.html`)
- 结论依据:原书例6-4和6-5展示架构层依赖规则可转为自动检查。
- 原始内容:the architect defines the desirable relationship between layers and writes a verification fitness function to govern it.