The Artima Developer Community
Sponsored Link

Good remark

Advertisement

Advertisement

This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Good remark

Posted by Herman Jansen on 03 Nov 1998, 3:31 AM

I think your remarks are very good and surely valid. In my opinion
aggragation and compostion is very much the same. There is no
difference in the code when you look at composition or aggragation.
It is more a subjective semantic thing. It is how much you feel
something is a part of something else. It is clear that your arms
and legs are part of yourself and should be considered aggragation.
But what about the clothes you wear. Is that a composition or
an aggregation ?
I think both are right, it is just the context you are working in.
The code you produce will be the same

> Hi,

> What about aggregation ? Is it not the other side of composition ? I view aggregartion as holding a reference to an object which exist outside the current object, otherwise same as composition.

> Couple of good thigs happen here:

> 1. Performance hit might be reduced as the object is already created

> 2. More importantly, it can do distributed processing ! The aggregated object need not me in the same namespace of the aggregator !(Pardon the nouns). Try to do this with inheritence !

> I think, when we talk about composition, we should consider aggregation also especially in this age of distributed computing.

> cheers






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us