Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Which is stronger uml aggregation or ddd aggregation?


Asked by Julien Watts on Nov 28, 2021 FAQ



So basically an aggregation encapsulates a set of classes which belong to each other. UML composition is semantically closer to DDD's aggregates. DDD Aggregates have some very well-defined semantics (actually stronger even than UML composition). Certainly much stronger than UML aggregation.
Also Know,
Association can exist between two or more classes in UML. Aggregation is a part of an association relationship. The composition is a part of an association relationship. There can be one-one, one-many, many-one, and many-many association present between the association classes.
Accordingly, Aggregation is a part of an association relationship. The composition is a part of an association relationship. Aggregation is considered as a weak type of association. The composition is considered as a strong type of association.
In respect to this,
Being an aggregated object of some class means that objects of the containing class can message you to do work. Aggregation provides an easy way for two objects to know about each other (and hence message each other).
Moreover,
Composite aggregation is a subtype of aggregation relation with characteristics as: It is a two-way association between the objects. It is a whole/part relationship. If a composite is deleted, all other parts associated with it are deleted.