Coupling exists when one part of the system is impacted by changes to another part. Where there is too much coupling, changes to a system can be difficult, time-consuming, and often destructive.
That said, coupling is also necessary. When objects collaborate with each other then they must interact, and this always creates some form of coupling among them.
Given that coupling is both needed and can also be problematic, this means that there is both good and bad coupling in a system.
“Loose” is the term most people use when they think the coupling is the way it should be. I prefer the term “intentional” because it means the coupling was created on purpose, and will therefore make sense and be expected to exist. Developers are smart; they never intend bad or excessive coupling.
“Tight” is the term people use to describe poor or excessive coupling, but I prefer the term “accidental.” The coupling we don’t want is the coupling we never intended in the first place; it’s a mistake. When we discover coupling that exists but serves no purpose, we find a way to eliminate it.
Here again, the patterns will help us. The coupling in each pattern is there for a defined reason, is logical and meaningful, and therefore intentional.
This is Scott Bain. Visit us at www.netobjectives.com.