Article
The Structural Dance: Coupling and Cohesion
Why these two ancient concepts remain the most important tools in a software architect's kit.
In the early days of software engineering, Larry Constantine and Edward Yourdon introduced two concepts that would define the discipline for decades: Coupling and Cohesion.
While they might sound like academic jargon, they are actually the most human tools we have for managing complexity.
Cohesion: The Power of Purpose
Cohesion is about how well the elements inside a module belong together. A highly cohesive module does one thing, and it does it with everything it has.
Think of a specialized surgical team. Everyone in that room is there for one purpose. Their actions are highly coordinated toward a single goal. That is high cohesion. Contrast this with a "handyman" shop where tools for plumbing, electrical work, and gardening are all thrown into one bin. Finding the right tool takes longer because the "module" (the bin) lacks a single, clear purpose.
In code, cohesion is your defense against the "God Object"—that 5,000-line class that handles everything from database connections to UI rendering.
Coupling: The Web of Dependencies
Coupling is about how much one module knows about another. The more they know, the more "coupled" they are.
Imagine a set of Christmas lights where if one bulb blows, the whole string goes dark. That is tight coupling. A better design is a set where each bulb is independent. You can swap one without affecting the rest.
In software, tight coupling means that a change in your "User" service might unexpectedly break your "Billing" logic. It creates a "fragile" system where developers are afraid to touch anything for fear of the ripple effect.
The Human Side
We care about these principles because our brains are limited. We can only hold so much context at once.
- High Cohesion allows us to look at a file and say, "I know exactly what this is for."
- Low Coupling allows us to change that file and say, "I know exactly what I haven't broken."
Architecture isn't about making machines run faster; it's about making systems that humans can continue to understand as they grow.
Discussion
Keep the conversation going
Log in to join the discussion.
No comments yet. The first thoughtful reply can set the tone for the whole thread.