I’ve been discussing with my co-workers when we have to use Aggregation or Association in UML models. Martin Fowler in UML Distilled, 3rd Edition says aggregation is the part-of relationship. It’s like saying that a car has an engine and 4 wheels as its parts. But aggregation was included in UML to differentiate from association, because in pre-UML days people didn’t knowhow to differentiate them. But aggregation, as Fowler says, is meaningless. Jim Rumbaugh says “Think of aggregation as a modeling placebo”. Association is a way to notate a property in our classes, but you don’t manage the life cycle of the associated property, as the aggregation relationship do. The solid line between the classes define the way one instance of the associating class can execute methods (operations realizations) of the associated object. So, why to use aggregation?
Association or Aggregation?
Tags: software
This entry was posted on June 7, 2006, 10:27 am and is filed under Uncategorized. You can follow any responses to this entry through RSS 2.0. You can leave a response, or trackback from your own site.