Separation of Concerns
ELI5 — The Vibe Check
Separation of Concerns means different parts of your code should handle different concerns and not step on each other's toes. Your database code shouldn't format HTML. Your UI code shouldn't write SQL. Give each concern its own neighborhood.
Real Talk
Separation of Concerns (SoC) is a design principle for separating a program into distinct sections, each addressing a specific concern. Concerns can be functional (auth, payments) or technical (presentation, data access). SoC reduces coupling and improves maintainability.
When You'll Hear This
"Move that database call out of the component — Separation of Concerns." / "SoC is why we have controllers, services, and repositories."
Related Terms
Cohesion
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.
Coupling
Coupling is how much two pieces of code depend on each other. Tight coupling means changing one breaks the other — like Siamese twins.
MVC (MVC)
MVC is like a restaurant: the Model is the kitchen (data and logic), the View is the plate of food (what the user sees), and the Controller is the waiter (...
Single Responsibility
Single Responsibility means every class or function should do ONE thing and do it well.