13.4. Package DependencyThe previous sections showed that sometimes a class in one package needs to use a class in another package. This causes a dependency between packages : if an element in package A uses an element in package B, then package A depends on package B, as shown in Figure 13-12. Figure 13-12. Package A depends on package B
Understanding the dependencies among your packages is useful for analyzing the stability of your software, as discussed in "Managing Package Dependencies." In fact, the most common use of UML package diagrams is to give an overview of the core packages in your software and the dependencies among them, as shown in Figure 13-13. Figure 13-13. A typical package diagram featuring core packages and dependencies"Managing Package Dependencies," later in this chapter, revisits package dependency diagrams, showing you how to use them to understand and improve the stability of your software. |