Win a copy of Terraform in Action this week in the Cloud 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

dependency vs association again???

 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic