# Separation of Concerns

> Giving each part of a program one job. Each part is kept apart from the rest.

**Field:** Software Development  
**Category:** Architecture  
**Also known as:** SoC, Concern Separation

## Think of it like

Think of it like a kitchen with a sink, a stove and a fridge. Each spot does one job.

## Definition

Separation of concerns means each part of a program deals with one job. A concern is one thing the program has to handle, like showing pages, saving data or checking passwords. Code for each concern lives in its own place. Then a change to one job does not spill into the others. The web itself splits pages this way: HTML for content, CSS for looks, JavaScript for actions.

## Example

Lucy's app mixed database calls into its page code. She moves them into their own file. Now she can change the database without touching any page.

## Why it matters

It keeps changes small and safe. You can work on one part without reading the whole program.

## Common mistake

Splitting code into so many tiny parts that one simple change touches ten files. Split by job, not by size.

## Three principles

- **One job per part.** Each concern on its own.
- **Changes stay local.** No spill into others.
- **Split by job.** Not just by size.

## Related terms

- [Software Architecture](https://learn.benibix.com/term/development/software-architecture)
- [Cohesion](https://learn.benibix.com/term/development/cohesion)
- [Coupling](https://learn.benibix.com/term/development/coupling)
- [Layered Architecture](https://learn.benibix.com/term/development/layered-architecture)

---

Source: https://learn.benibix.com/term/development/separation-of-concerns
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
