Use Dependencies

Most dependencies between components (DCs) have the semantics “A uses some functionality of B”, or “A requires B”. The concrete meaning of “use” depends on the technologies of the interacting development relations.“Using a development object“ can stand for a number of different actions, such as calling the method of a Java class, implementing an interface, deriving one class from another, including a C header file or referring to a table definition.

Using a development object is allowed if it is named in a public part of its component and a dependency to this public part has been declared. Note that dependencies are declared between components, even though the development objects are actually used.

In the following figure, a Java class Y in component B wants to implement an interface X in the public part of component A. This is possible because component B declares a use relation to public part ppA to which X belongs.

Note that usage relations are ordinary dependencies and, therefore, must obey the usual visibility rules. The class Z in the figure, for example, is not usable for Y.

Using a development object of another DC.

Declaring a dependency between components is a necessary prerequisite for using a public development object in the public part of another component, but that alone is not enough. In the example above, according to the Java syntax, Y would have to explicitly import X with the ”import X” statement, before the implementation could be executed. With a use dependency, you declare your intention of wanting to use a component; the use dependency does not execute this use concretely (this usually depends on the technology of the participating objects). For more information, see Purposes of Public Parts.