知识卡片
泛化结构组织共同能力
泛化结构用继承或实例关系表达相似能力与差异,帮助分析复用和功能增量。图1.8的Fact继承java.util.Observable,ScenarioVO等类型继承Fact;图示共享id和type等字段。下图只保留其中一条派生路径,不补造原图未显示的方法,也不把类数当作运行组件数。
结构图:
classDiagram
class Observable["java.util.Observable"]
class Fact {
int id
String type
}
class ScenarioVO
Observable <|-- Fact
Fact <|-- ScenarioVO
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 什么是软件架构 · 查看原书依据
Class (or generalization) structure. The modules in this structure are called classes, and they are related through an “inherits-from” or “is-an-instance-of” relation. This view supports reasoning about collections of similar behavior or capability and parameterized differences. The class structure allows one to reason about reuse and the incremental addition of functionality.
参考来源
- 位置:《Software Architecture in Practice, 4th Edition》第1章《什么是软件架构》(来源项目:book-sources;源文件:extracted/Software Architecture in Practice, 4th Edition/_epub-src/ch01.html)
- 结论依据:原文的定义、机制或比较支持“泛化结构用继承或实例关系表达相似能力与差异,帮助分析复用和功能增量”;正文保留其条件与取舍。
- 原始内容:Class (or generalization) structure. The modules in this structure are called classes, and they are related through an “inherits-from” or “is-an-instance-of” relation. This view supports reasoning about collections of similar behavior or capability and parameterized differences. The class structure allows one to reason about reuse and the incremental addition of functionality.