Promptles
Architecture

Separation of Concerns

beginner

Definition

A guiding rule for keeping code tidy: each part of a program should have one job and stay out of the others' business. When jobs are mixed together, a small change in one place can quietly break something completely unrelated.

In the wild

In a well-organized online store, the part that calculates prices doesn't also send emails, and the part that draws the page doesn't also talk to the database. If the design team wants to redo the page, they can do it without worrying about accidentally messing up the math behind discounts.

More from Architecture