Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Dependency :</strong> </p> <blockquote> <p>Indicates that a <strong>client</strong> element(of any kind, including classes, packages, use cases, etc) has knowledge of another <strong>supplier</strong> element, and a change in supplier can effect the client. </p> </blockquote> <p><strong>So "dependency" is very broad relationship</strong>.Suppose that if a class-object(client) has another class-object(supplier) as a member,if a class-object send a message to another class-object,if a class-object takes another class-object as an parameter from its methods, even if a class(client) is subclass of another class(supplier) there will be dependency since change from supplier will effect clients.</p> <p><strong>Technically all of those relationships can be shown by "Dependency" line. But some of above relationships already has special notations</strong>: such as for superclass-subclass relationship we have generalization relationship.No need to show also "dependency" line because if they have generalization relationship, they have dependency. And we have "association" relationship for class-object(client) who has another class-object as a member [attribute]. So also no need to show extra dependency line in this situation.</p> <p><strong>Actually "Dependency" is badly defined relationship for class diagrams</strong>. But it can be usefull for showing dependency in which UML has no special notation such as :</p> <ul> <li>if you has another class-object(supplier) as a parameter in one of your class(client) methods</li> <li>if you have dependency to global variables</li> <li>when you call static methods on another classes.</li> <li>local variables (which you think you have important dependency)</li> </ul> <p><img src="https://i.stack.imgur.com/LPNxn.jpg" alt="enter image description here"></p> <pre><code>public class RepositoryManager { public UpdatePriceFor(ProductDescription description) { Time date = Clock::GetTime(); Money oldPrice =description.GetPrice(); ... } private IList&lt;Item&gt; itemsList = new List&lt;Item&gt;(); } </code></pre> <blockquote> <p>So all "associations" are also shows "dependency".But "dependency" is broad-general-weak relationship.<strong>As a rule if there is a special relationship which is more specific-stronger than dependency relationship than use it.</strong> And lastly use all your relationship "economically". Show only important ones based on modeler-model reader perspectives.</p> </blockquote> <p>[ Source : Adapted from Craig Larman's Applying UML and Patterns book ]</p> <p>Check Fowlers bliki for further information <a href="http://martinfowler.com/bliki/DependencyAndAssociation.html" rel="nofollow noreferrer">DependencyAndAssociation</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload