5.3 Dependencies
Figure 5-1 shows components associated
with the
project management system, and Figure 5-3 shows
nodes associated with the project management system, but how are
components related to undifferentiated and differentiated classes,
packages, subsystems, and to other components and nodes? Specialized
types of dependencies called reside, use, and deploy
dependencies address these questions. The next few sections
in this chapter discuss these specialized types of dependencies.
Dependences in general are discussed in Chapter 3.
5.3.1 Reside Dependencies
A reside dependency from a component to
any UML element indicates that
the component is a client of the element, which is itself considered
a supplier, and that the element resides in the component. The
element may be an undifferentiated or differentiated class, package,
or subsystem. An element may reside in any number of components, and
a component may have any number of elements that reside in it.A reside dependency is shown as a dashed arrow from a client
component to a supplier element marked with the
reside keyword. Figure 5-5 shows
that the User Interface and
Utility packages reside in the
User Interface component.
Because the User Interface package depends on the
Utility package, the User
Interface and Utility packages
must reside in the same component; otherwise, the
User Interface package would
not be able to use the Utility package.
Figure 5-5. Reside dependencies for packages

Figure 5-6 shows that the
Business Processing subsystem
and Utility package reside in the
Business Processing component. Because the
Business Processing subsystem provides the
IBusiness Processing interface, the
Business Processing component
also provides the interface. Again, because the
Business Processing subsystem
depends on the Utility package, the
Business Processing subsystem
and Utility package must reside in the same
component; otherwise, the Business
Processing subsystem would not be able to use the
Utility package. Remember, it's
perfectly fine for an element to reside in more than one component.
For example, the Utility package resides in both
the User Interface and Business
Processing components, and, as you will soon see, in the
Data component.
Figure 5-6. Reside dependencies for subsystems

Alternatively, an element that resides inside a component may be
shown nested inside the component. Figure 5-7 shows
that the Data subsystem and
Utility package reside in the
Data component. The Data
subsystem is drawn inside the Data component,
while the reside dependency to Utility is still
drawn in the same manner as in Figures Figure 5-5
and Figure 5-6.
Figure 5-7. Reside dependencies using nesting

Notice that the Utility package resides in all the
components in Figures Figure 5-5, Figure 5-6, and Figure 5-7, because
each component described in those figures has a package that uses the
Utility package. Details of the
Utility package are discussed in Chapter 3.
5.3.2 Use Dependencies
A use dependency from a client component
to a supplier component indicates
that the client component uses or depends on the supplier component.
A use dependency from a client component to a supplier
component's interface indicates that the client
component uses or depends on the interface provided by the supplier
component. A use dependency is shown as a dashed arrow from a client
component to a supplier component or a supplier
component's interface. The dependency may be marked
with the use keyword; however, the keyword is
often omitted because this is the default, and the meaning is evident
from how the dependency is used.Figure 5-8 shows how the various components of the
project management system are related:
The User Interface component
Uses the Security component and the
IBusiness Processing interface provided by the
Business Processing component
The Business Processing component
Uses the Security component and the
IProducible and IConsumable
interfaces provided by the Data component
The Data component
Uses the Security component
Figure 5-8. Use dependencies

5.3.3 Deploy Dependencies
A deploy dependency from a
client component to a supplier
node indicates that the client component is deployed on the supplier
node.A deploy dependency is shown as a dashed arrow from a client
component to a supplier node marked with the
deploy keyword. Figure 5-9 shows
that the User Interface
component is deployed on the Desktop Client node.
Figure 5-9. Deploy dependencies

Figure 5-10 shows that the
Business Processing component
is deployed on the Business-Processing Server
node.
Figure 5-10. Deploy dependencies for a subsystem

Alternatively, a component that is deployed on a node may be shown
nested inside the node. Figure 5-11 shows that the
Data component is deployed on the
Database Server node.
Figure 5-11. Deploy dependencies using nesting
