Jump to content

Dependency (UML): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Brick Thrower (talk | contribs)
→‎[[Dependency]] vs. [[Link]]: // remove article links from header text
Updated obsolete text and reference by current version.
 
(44 intermediate revisions by 34 users not shown)
Line 1: Line 1:
In the [[Unified Modeling Language]] (UML), a '''Dependency'''<ref name=OMG>
A '''dependency''' in the [[Unified Modeling Language]] exists between two defined [[element]]s if a change to the definition of one may result in a change to the other. In UML this is indicated by a dashed line pointing from the dependent (or client) to the independent (or supplier) element.
{{cite book
|chapter=Dependency
|title=Unified Modeling Language 2.5.1
|series=[[Object Management Group |OMG]] Document Number formal/2017-12-05
|date=December 2017
|publisher=[[Object Management Group]] Standards Development Organization (OMG SDO)
|page=42
|url=https://www.omg.org/spec/UML/2.5.1/PDF
}}
</ref>
is "a Relationship that signifies that a single model [[Element (UML)|Element]] or a set of model Elements requires other model Elements for their specification or implementation."<ref name=OMG/>
"This means that the complete semantics of the ''client'' Element(s) are either semantically or structurally ''dependent'' on the definition of the ''supplier'' Element(s)."<ref name=OMG/>
Two or more elements in this relationship are called [[tuple]]s.


In UML, this is indicated by a dashed line pointing from the dependent (or client) to the independent (or supplier) element. The arrow representing a Dependency specifies the direction of a relationship, not the direction of a process.
If more than one client or supplier participates in the dependency, arrows with their tails on the client elements are connected to the tails of one or more arrows with their heads on the supplier elements. Place a small dot on the junction point along with a note on the dependency.

Dependency is a model-level relationship and not a run-time relationship -- describing the need to investigate the model definition of the client element for possible changes if the model definition of the supplier element is changed.

A '''dependency''' is a [[semantic]] [[relationship]] where a change to the influent or [[independent]] [[model]]ing [[element]] may affect the [[semantic]]s of the [[dependent]] [[model]]ing [[element]].

A '''dependency''' identifies a [[set]] of [[model]] [[element]]s that [[require]]s other [[model]] [[element]]s for their [[specification]] or [[implementation]]. The complete [[semantic]]s of the [[dependency|depend]]ing [[element]]s is either [[semantic]]ally or [[structure|structurally]] [[dependent]] upon the [[definition]] of the [[supplier]] [[element]](s).

The arrow representing a '''dependency''' specifies the direction of a [[relationship]], not the direction of a [[process]].


==Standard predefined dependencies==
==Standard predefined dependencies==
[[Unified Modeling Language|UML]]-defined dependencies include:
[[Unified Modeling Language|UML]] - defined dependencies include:<ref>{{cite web |last1=Fakhroutdinov |first1=Kirill |title=Dependency in UML |url=https://www.uml-diagrams.org/dependency.html |website=uml-diagrams.org |access-date=2 April 2024}}</ref>
* «call» UML2: The client (an operation) may call the supplier (an operation)
* «call2» UML2: The client (an operation) may call the supplier (an operation){{Citation needed|reason=the cited source only names a &lt;&lt;call&gt;&gt; dependency no &lt;&lt;call2&gt;&gt;|date=April 2024}}
* «create» UML2: The client (a classifier) may create instances of the supplier (a classifier)
* «create» UML2: The client (a classifier) may create instances of the supplier (a classifier)
* «derive» UML2: The client (e.g., attribute value, link) may be computed from the supplier(s)
* «derive» UML2: The client (e.g., attribute value, link) may be computed from the supplier(s)
Line 25: Line 30:
* «use» UML2: The client element somehow "uses" the supplier
* «use» UML2: The client element somehow "uses" the supplier


===Dependency vs. Link===
==Differences with UML link==
A UML link is run-time relationship between instances of classifiers, while a dependency is a model-time relationship between definitions.
A UML link is run-time relationship between instances of classifiers, while a dependency is a model-time relationship between definitions.


Line 36: Line 41:
==See also==
==See also==
*[[functional dependency]]
*[[functional dependency]]
*[[dependent entity]]
*[[independent entity]]


==References==
------
{{Reflist}}

==Further reading==
{{cite book |title=UML 2 Certification Guide |last1=Weilkiens |first1=Tim |last2=Oestereich |first2=Bernd |year=2007 |publisher=[[Morgan Kaufmann]] |isbn=0-12-373585-8}}

{{cite book
|chapter=Dependency
|title=Unified Modeling Language 2.5.1
|series=[[Object Management Group |OMG]] Document Number formal/2017-12-05
|date=December 2017
|publisher=[[Object Management Group]] Standards Development Organization (OMG SDO)
|page=42
|url=https://www.omg.org/spec/UML/2.5.1/PDF
}}

==External links==
* [http://www.uml-diagrams.org/class-diagrams.html#dependency Dependency Relationship in UML 2]

* {{cite book
|chapter=Dependency
|title=Unified Modeling Language 2.5.1
|series=[[Object Management Group |OMG]] Document Number formal/2017-12-05
|date=December 2017
|publisher=[[Object Management Group]] Standards Development Organization (OMG SDO)
|page=42
|url=https://www.omg.org/spec/UML/2.5.1/PDF
}}

{{DEFAULTSORT:Dependency (Uml)}}
[[Category:Unified Modeling Language]]
[[Category:Unified Modeling Language]]
[[Category:Data Modeling]]
[[Category:Data modeling]]

[[de:Abh%C3%A4ngigkeitsbeziehung_%28UML%29]]
{{UML}}
{{uml-stub}}

Latest revision as of 13:24, 8 June 2024

In the Unified Modeling Language (UML), a Dependency[1] is "a Relationship that signifies that a single model Element or a set of model Elements requires other model Elements for their specification or implementation."[1] "This means that the complete semantics of the client Element(s) are either semantically or structurally dependent on the definition of the supplier Element(s)."[1] Two or more elements in this relationship are called tuples.

In UML, this is indicated by a dashed line pointing from the dependent (or client) to the independent (or supplier) element. The arrow representing a Dependency specifies the direction of a relationship, not the direction of a process.

Standard predefined dependencies

[edit]

UML - defined dependencies include:[2]

  • «call2» UML2: The client (an operation) may call the supplier (an operation)[citation needed]
  • «create» UML2: The client (a classifier) may create instances of the supplier (a classifier)
  • «derive» UML2: The client (e.g., attribute value, link) may be computed from the supplier(s)
  • «instantiate» UML2: Operations of the client (a classifier) may create instances of the supplier (a classifier)
  • «permit» UML2: Obsolete
  • «realize» UML2: Obsolete
  • «refine» UML2: The client element(s) are at a "later" semantic level than the supplier(s)
  • «send» UML2: The client (an operation) sends the supplier (a signal)
  • «substitute» UML2: The client element can replace (under some circumstances) the supplier
  • «trace» UML2: The client elements "trace" to the suppliers. Typically used for levels of requirements
  • «use» UML2: The client element somehow "uses" the supplier
[edit]

A UML link is run-time relationship between instances of classifiers, while a dependency is a model-time relationship between definitions.

A typical uni-directional link requires the one instance to know about, and thus depend, upon the other, but this is not required. A uni-directional link only requires the possibility of navigation not dependency.

Likewise, a bi-directional link requires that both instances may traverse to each other, but this also does not require dependency.

However, after the traversal of the association, if some property of the target instance's definition is accessed, such as an operation or attribute, a dependency is created.

See also

[edit]

References

[edit]
  1. ^ a b c "Dependency". Unified Modeling Language 2.5.1. OMG Document Number formal/2017-12-05. Object Management Group Standards Development Organization (OMG SDO). December 2017. p. 42.
  2. ^ Fakhroutdinov, Kirill. "Dependency in UML". uml-diagrams.org. Retrieved 2 April 2024.

Further reading

[edit]

Weilkiens, Tim; Oestereich, Bernd (2007). UML 2 Certification Guide. Morgan Kaufmann. ISBN 0-12-373585-8.

"Dependency". Unified Modeling Language 2.5.1. OMG Document Number formal/2017-12-05. Object Management Group Standards Development Organization (OMG SDO). December 2017. p. 42.

[edit]