Coupling
In software parlance, coupling refers to the gradation of interdependence between different modules. It measures how much impact does a change in one routine have in another. We can broadly distinguish between two major types of coupling: tight coupling and loose coupling. Two modules are considered tightly coupled if you cannot change one module without having a cascading effect on the second module. On the contrary, if one module can change resulting in little or no change in the other module, they are considered loosely coupled.
Coupling plays a major role in testability of your code. The more loosely coupled your code is, the more testable it is. It is not always easy to reduce or eliminate coupling, but since the introduction of dependency ...
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