Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process, Second Edition
by Craig Larman
16.8. Low Coupling
Assign a responsibility so that coupling remains low.
Solution
How to support low dependency, low change impact, and increased reuse?
Problem
Coupling is a measure of how strongly one element is connected to, has knowledge of, or relies on other elements. An element with low (or weak) coupling is not dependent on too many other elements; “too many” is context-dependent, but will be examined. These elements include classes, subsystems, systems, and so on.
A class with high (or strong) coupling relies on many other classes. Such classes may be undesirable; some suffer from the following problems:
Changes in related classes force local changes.
Harder to understand in isolation.
Harder to reuse because its use requires the additional ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access