Skip to content

Cohesion

Medium — good to knowArchitecture

ELI5 — The Vibe Check

Cohesion is how well the things inside a module belong together. High cohesion means all the stuff in a class is related — like a toolbox full of tools. Low cohesion means the class is a junk drawer — a random mix of unrelated stuff. High cohesion = good.

Real Talk

Cohesion measures how strongly related the responsibilities within a single module are. High cohesion means a module focuses on a single purpose with all its elements contributing to that purpose. Low cohesion indicates the module does too many unrelated things.

When You'll Hear This

"This service has low cohesion — it handles users, payments, AND emails." / "High cohesion and low coupling is the golden goal."

Made with passive-aggressive love by manoga.digital. Powered by Claude.