在这里,我有另一个问题聚合和关联。我想学习一些UML的基础知识,所以我开始阅读Martin Fowler的“UML distillation”。我读了两个章节关于类,有一件事,我不能完全掌握我想,这是聚合vs关联。在这本书有这个报价:
In the pre-UML days,people were usually rather vague on what was aggregation and what was
association. Whether vague or not,they were always inconsistent with everyone else. As a result,
many modelers think that aggregation is important,although for different reasons. So the UML
included aggregation (Figure 5.3) but with hardly any semantics. As Jim Rumbaugh says,“Think of it
as a modeling placebo” [Rumbaugh,UML Reference].
正如我从Stack Overflow中读到的这个引用和主题中理解的,我使用的那两个关系中的哪一个是无关紧要的,他们的意思是基本相同,或者是有什么情况下使用聚合而不是关联和/或我不能改变一个到另一个而不改变类图的“意义”?
我问这个,beacuse这本书是从2003年,有些事情可能改变这几年。