Coupling
Coupling is a much stronger and useful criterion than cohesion. It describes the interface, or flow of data values, between a called function (a server function) and a calling function (a client function).
Coupling can be implicit, with functions communicating through global variables, or explicit, when the client and server functions communicate through parameters. Implicit coupling is higher—it results in a higher degree of dependency between the client and server functions. Explicit coupling is lower: When functions communicate through parameters, it is easier to understand, reuse, and modify them.
The intensity of coupling is described by the number of values that flow from the client function to the server function and back. A ...
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