separation of concerns
noun
- Dividing a program so each part handles one distinct responsibility and knows as little as possible about the others. Moving SQL out of React components into a data layer let the team swap databases without touching the UI.
In plain words
- this code does too many things
- everything is mixed together
- the UI code talks directly to the database
- one giant file that does everything
See also tight coupling leaky abstraction dependency injection