This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Component diagrams - dependency and association?

 
Ray James
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have always seen dependencies in component diagrams (the dashed line with an arrow) and even inheritance (dashed with a triangle) but what about a non-dependency association? i.e. when would you use a a solid line association instead of using a dashed dependency association in a component diagram?
 
Juan Rolando Prieur-Reza
Ranch Hand
Posts: 237
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ray James:
I have always seen dependencies in component diagrams (the dashed line with an arrow) and even inheritance (dashed with a triangle) but what about a non-dependency association? i.e. when would you use a a solid line association instead of using a dashed dependency association in a component diagram?

association (solid line) is not defined for component diagrams.
 
David Follow
Ranch Hand
Posts: 223
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by john prieur:


association (solid line) is not defined for component diagrams.



Hi,

is that really true? I was asking myself the same question. Can I use associations in component diagrams or are therre only dependencies?

D.
 
Dan Drillich
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David,

The purpose of the component diagram is to show the relationships among the components in a generic way and this diagram emphasizes the components and less the relationships among them. Therefore, the only relationship is the dependency.

Martin Fowler defines dependency as:
A dependency exists between two elements if changes to the definition of one element may cause changes to the other.


An association is therefore one type of dependency.

Regards,
Dan
 
David Follow
Ranch Hand
Posts: 223
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dan Drillich:
Therefore, the only relationship is the dependency.


Dan,

so just using dependencies (dashed line with arrow) is Ok, or better, the only type allowed in a component diagram?

D.
 
Brian Smith
Ranch Hand
Posts: 232
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gentlepeople,
I also have a question regarding a dependency - There's mentions about dependency in UML Distilled 2nd Edition in Page 108 (chp -7) that with classes, dependencies exist for various reasons:
1 One class sends a message to another
2 One class has nother as part of its data ???
3 One class mentions another as a parameter to an operation

Can someone explain me the 2? what does the "as part of its data" mean? I believe its not an attribute of type other object - that would be an association with a peramanent arrow link. or is it a return value of a method? Please help me with it.

Thanks.
BR
 
Dan Drillich
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David,

so just using dependencies (dashed line with arrow) is Ok,


I think so.

or better, the only type allowed in a component diagram?


There is no rigid line across the UML diagrams, which means that you can conceivably 'borrow' the association from the class diagram and use it in the component diagram. But I think that the purpose of the component diagram is to show dependencies only.

Regards,
Dan
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic