Single choice principle
From CSSEMediaWiki
Revision as of 11:06, 29 September 2010 by Scott Parlane (Talk | contribs)
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)