知识卡片
模块直连会暴露编译时依赖
模块之间直接调用最简单:一个模块实例化另一模块的类并调用方法。但同库代码容易随意跨界访问;独立构件则必须显式引入类引用或共享接口,形成编译时依赖。接口只改变依赖组织,不会让过多通信自动消失;模块间调用密集时,先检查领域边界是否划错。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- The Modular Monolith Architecture Style · 查看原书依据
A module that communicates with other modules won’t compile unless it has the class references, which means the developer has to form a compile-time dependency between those modules.
参考来源
- 位置:《Fundamentals of Software Architecture》原书第11章《The Modular Monolith Architecture Style》(阅读计划第14项;源文件:`OEBPS/ch11.html`)
- 结论依据:原文说明点对点调用、独立构件的编译时依赖,以及过量通信的风险。
- 原始内容:A module that communicates with other modules won’t compile unless it has the class references, which means the developer has to form a compile-time dependency between those modules.