Single choice principle

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(New page: This states that whenever a program needs to support a set of known alternatives, this set should only exist in one module. Repeating the alternatives in several modules is unnecessary and...)
 
m (Reverted edits by Ebybymic (Talk); changed back to last version by Scott Parlane)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
This states that whenever a program needs to support a set of known alternatives, this set should only exist in one module. Repeating the alternatives in several modules is unnecessary and makes it hard to maintain when an alternative is added or removed.
 
This states that whenever a program needs to support a set of known alternatives, this set should only exist in one module. Repeating the alternatives in several modules is unnecessary and makes it hard to maintain when an alternative is added or removed.
 +
 +
== See also ==
 +
* [[Design maxims]]
 +
* [[Once and only once]]
 +
* [[Duplicate code smell]]
 +
* [[Don't repeat yourself]]
 +
* [[Code smells]]
 +
* [[Refactoring]]
 +
* [[Strategy]]
 +
* [[Switch statement smell]] (Espically, the same switch statement in many places)

Latest revision as of 03:23, 25 November 2010

This states that whenever a program needs to support a set of known alternatives, this set should only exist in one module. Repeating the alternatives in several modules is unnecessary and makes it hard to maintain when an alternative is added or removed.

See also

Personal tools