🏗️Coupling
Also known as Loose Coupling, Tight Coupling, Decoupling
How much one part of a program leans on another.
Think of it like
Think of it like toys joined with glue or with clips. Clipped toys come apart easily.
Example
Jack's checkout code reads the payment firm's data straight from its API. When the firm changes its API, he must fix checkout too. That is tight coupling.
Why it matters
Loose coupling is what lets one team change their part without breaking everyone else's.
Definition
Common mistake
Key takeaways
- 1Know little. About other parts.
- 2Talk through interfaces. Not inner details.
- 3Aim loose. Change one part alone.