Core Concepts: Separation of Concerns
This article as PDF
Separation of concerns is about creating modular systems in which each module specialises and provides well focussed, self-contained functionality. Systems that are divided into highly cohesive, weakly coupled modules with coherent abstractions will generally also have good separation of concerns.
Examples
HTML, CSS, and JavaScript
A commonly encountered set of technologies are HTML, CSS, and JavaScript. HTML describes the structure of a document (web page), CSS describes how the document should be presented, and JavaScript provides the document’s behaviour. Each technology supports a specific concern1.
1At least that’s the intention. In practice there is considerable overlap as JavaScript can manipulate both presentation and structure, albeit via the other two.