Separation of concerns

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
Line 5: Line 5:
 
Separation of concerns is usually measured with the Cohesion and Coupling metrics.
 
Separation of concerns is usually measured with the Cohesion and Coupling metrics.
 
==See Also==
 
==See Also==
*[[Single responsibility principle]]
+
* [[Single responsibility principle]]
 +
* [[One key abstraction]]

Revision as of 08:23, 6 October 2008

Nothing is particularly hard if you divide it into small jobs. - Henry Ford

Separation of concerns is rather self-explanatory: Each of the different parts/tasks/roles/jobs of a program should be kept as separate as possible from each other. This principle is relevant at all levels of program organisation. At the high level, each package or class should group code relating to one broad concern, while at lower levels, a clearly written line of code should invoke one coherent operation, without unexpected side-effects, and any particular method should accomplish one single task.

Separation of concerns is usually measured with the Cohesion and Coupling metrics.

See Also

Personal tools