Common Modeling Techniques
Modeling Webs of Relationships
When you model the vocabulary of a complex system, you may encounter dozens, if not hundreds or thousands, of classes, interfaces, components, nodes, and use cases. Establishing a crisp boundary around each of these abstractions is hard. Establishing the myriad of relationships among these abstractions is even harder: This requires you to form a balanced distribution of responsibilities in the system as a whole, with individual abstractions that are tightly cohesive and with relationships that are expressive, yet loosely coupled.
Modeling the vocabulary of a system and modeling the distribution of responsibilities in a system are discussed in Chapter 4 . |
When you model these webs of relationships,
Don't begin in isolation. Apply use cases and scenarios to drive your discovery of the relationships among a set of abstractions.
Use cases are discussed in Chapter 17 .
In general, start by modeling the structural relationships that are present. These reflect the static view of the system and are therefore fairly tangible.
Next, identify opportunities for generalization/specialization relationships; use multiple inheritance sparingly.
Only after completing the preceding steps should you look for dependencies; they generally represent more-subtle forms of semantic connection.
For each kind of relationship, start with its basic form and apply advanced features only as absolutely necessary to express your intent.
Remember that it is both undesirable and unnecessary to model all relationships among a set of abstractions in a single diagram or view. Rather, build up your system's relationships by considering different views on the system. Highlight interesting sets of relationships in individual diagrams.
The five views of an architecture are discussed in Chapter 2; the Rational Unified Process is summarized in Appendix B . |