Johnson and Foote's heuristics
From CSSEMediaWiki
(Difference between revisions)
RobertLechte (Talk | contribs) |
m |
||
Line 1: | Line 1: | ||
− | See | + | See [http://www.laputan.org/drc/drc.html#RulesForFindingStandardProtocols Designing Reusable Classes] |
[[Johnson and Foote 1988]] | [[Johnson and Foote 1988]] |
Revision as of 06:54, 8 August 2009
See Designing Reusable Classes
- Recursion introduction
- Eliminate case analysis
- Reduce the number of arguments
- Reduce the size of methods
- Class hierarchies should be deep and narrow
- The top of the class hierarchy should be abstract
- Minimize accesses to variables
- Subclasses should be specializations
- Split large classes
- Factor implementation differences into subcomponents
- Separate methods that do not communicate
- Send messages to components instead of to self
- Reduce implicit parameter passing