Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Association x Aggregation e Composition

 
Antonio Rafael Rodrigues
Ranch Hand
Posts: 74
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to know the community's opinion about demonstrate aggregation and composition relationships.
Do you think that it is Worth to use this kind of relationships? Or to use only a simple association with cardinalities is the best approach?
Specifically in the Architect Certification assignment . Did you guys use aggregation and composition or only simple associations in the cases where there was a whole/part scenario?

Thanks.
 
Ulf Dittmer
Rancher
Posts: 42969
73
 
Antonio Rafael Rodrigues
Ranch Hand
Posts: 74
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf Dittmer.
I've already read that. These points are my motivation to ask if the people usually indicate aggregation and composition in the assignment. Furthermore, if the people use it in real life.
I've never used it. In my job, even in the whole/part sceneries, we only use simple associations with cardinalities that, in our oppinion, leave the relationship clear enough.
 
Antonio Rafael Rodrigues
Ranch Hand
Posts: 74
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please. Can someone help me?

I found the very same question as mine here: http://www.coderanch.com/t/156017/java-Architect-SCEA/certification/Aggregation-Composition-Topic
No one responds him as well.

Thanks =]
 
Amritendu De
author
Ranch Hand
Posts: 188
11
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are not sure about composition or aggregation, leave it as an association. Nothing wrong with this approach.

You just have to decide whether it is bidirectional or unidirectional. Some projects implement all relationships as bidirectional. Nothing wrong with this approach either.

The key is to understand the relationship - how is delete managed, how is the dependency from a real life point of view, etc
 
Antonio Rafael Rodrigues
Ranch Hand
Posts: 74
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Amritendu.
Good sense is the way to go.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic