aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Component diagrams - dependency and association? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Component diagrams - dependency and association?" Watch "Component diagrams - dependency and association?" New topic
Author

Component diagrams - dependency and association?

Ray James
Greenhorn

Joined: Feb 14, 2002
Posts: 15
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

Joined: Jun 20, 2003
Posts: 236
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.


Juan Rolando Prieur-Reza, M.S., LSSBB, SCEA, SCBCD, SCWCD, SCJP/1.6, IBM OOAD, SCSA
David Follow
Ranch Hand

Joined: Oct 16, 2001
Posts: 223
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.


SCJP, SCEA
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
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


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
David Follow
Ranch Hand

Joined: Oct 16, 2001
Posts: 223
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

Joined: Oct 26, 2002
Posts: 232
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

Joined: Jul 09, 2001
Posts: 1180
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
 
subject: Component diagrams - dependency and association?