Separation of concerns
|
In computer science, separation of concerns (SoC) is the process of breaking a program into distinct features that overlap in functionality as little as possible. A concern is any piece of interest or focus in a program. Typically, concerns are synonymous with features or behaviors.
All programming paradigms aid developers in the process of SoC. For example, Object-oriented programming languages such as the Java programming language can separate concerns into classes and methods. Procedural programming languages such as C and Pascal can separate concerns into procedures. Aspect-oriented programming languages can separate concerns into aspects.
Soc is achieved by modularity, encapsulation, and information hiding.
The term separation of concerns was coined by David Parnas in his paper On The Criteria To Be Used in Decomposing Systems into Modules (http://www.acm.org/classics/may96/).
Examples
A program may log its actions, handle a database of records, compute a statistic from these records, etc.