Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Component diagrams - dependency and association?

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic