Re: Aggregation vs composition
From: Daniel T. (postmaster_at_eathlink.net)
Date: 04/30/04
- Next message: Daniel T.: "Re: Aggregation vs composition"
- Previous message: Daniel T.: "Re: Aggregation vs composition"
- In reply to: Richard Corfield: "Re: Aggregation vs composition"
- Next in thread: Richard Corfield: "Re: Aggregation vs composition"
- Reply: Richard Corfield: "Re: Aggregation vs composition"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Apr 2004 03:21:57 GMT
Richard Corfield <rcnews2@littondale.dyndns.org> wrote:
> On 2004-04-28, Robert C Martin <unclebob@objectmentor.com> wrote:
> >
> > Even that is an overstatement. C has no responsibility at all. We
> > hope that the designer has the sense to make sure not to use B after
> > B's destruction.
>
> I may be weighing in the wrong way, as slrn my newsreader only lets me
> see parent articles but I've not found a way of finding those parents'
> children. Like many computer users, I stick with the familliar and think
> of anything else as unfamilliar.
>
> Anyway, surely aggregation and composition are conceptual things. They
> do tell you what your implementation wants to achieve, a said before,
> it lets you work out who's responsible for lifecycle events.
But what are these "lifecycle events"? What does it mean to have "sole
disposition for" an object? Be sure to only use language neutral
concepts...
> Footballers
> may be part of a team through aggregation. When the team goes bust, they
> don't go and kill off the players, at least in a civilised society. Toe
> could be thought of as composite part of foot. Lose the foot, and the
> toes go with it.
Yes, I may end up with a convert here! :-)
> A previous post mentioned hiding the details of the contained object.
> That, to me, is another principle. Wasn't it called Demeter or
> something?
Yes, the "Law of Demeter".
- Next message: Daniel T.: "Re: Aggregation vs composition"
- Previous message: Daniel T.: "Re: Aggregation vs composition"
- In reply to: Richard Corfield: "Re: Aggregation vs composition"
- Next in thread: Richard Corfield: "Re: Aggregation vs composition"
- Reply: Richard Corfield: "Re: Aggregation vs composition"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|