• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dependency vs association again???

 
william kane
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What difference would it make if I model a relationship as a dependency or as an association in my analysis/design class diagram?
Ex. What difference would it make to the understanding of the clients(ex teammembers) if I model the relationship between a professor and a whiteboard as dependency(writes on) when compared to modeling it as an association(writes on) in my analysis class diagram and my design class diagram?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In analysis I've hardly found a need for any line decoration atoll. Those little filled-in diamonds tend to poke through the napkin.
For design it gets to be important to know about "ownership". If you fire a professor, do all the whiteboards go away? If your diagram is your only mode of communication with someone, you maybe oughtta go for that kind of detail. But if you're standing around talking and something like professors and whiteboards is pretty obvious, skip it.
Dependencies are interesting all by themselves to see how well decoupled things are and to eliminate cycles in packages. These are things you're likely to see in the code more readily than a diagram. I just made a script to take output from JDepend (free from Clarkware) and make input for Dot (free from Graphviz) so Dot can draw package dependency pictures. My "review the picture, change the code, regenerate the picture" cycle is just seconds. Because Eclipse makes it so easy to refactor, this is not something I'd spend a lot of time designing before I start.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wanna share the script with the rest of us, Stan?
I recently made a quick google for products that could visualize package dependencies and came out empty-handed.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lasse Koskela:
I recently made a quick google for products that could visualize package dependencies and came out empty-handed.

Take a look at http://metrics.sourceforge.net/ - it's quite cool!
And if you don't want to restrict your search to *free* tools, you didn't need to go a long way... http://www.javaranch.com/toolshed/thesmallworlds/thesmallworlds.jsp
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks like a neat metrics package. We're about to start on customization of a vendor package, and it would be neat to track some of these over time. The export to XML ought to allow that.
Here's the little script, for what it's worth. It's in REXX
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic