Design maxims

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(added parallel inheritance hierarchy to the list of code smells)
Line 60: Line 60:
  
 
'''Clumps of maxims'''
 
'''Clumps of maxims'''
* [[Johnson and Foote's heuristics]]:
+
=== [[Johnson and Foote's heuristics]]:===
 
** [[Recursion introduction]]
 
** [[Recursion introduction]]
 
** [[Eliminate case analysis]]
 
** [[Eliminate case analysis]]
Line 74: Line 74:
 
** [[Send messages to components instead of to self]]
 
** [[Send messages to components instead of to self]]
 
** [[Reduce implicit parameter passing]]
 
** [[Reduce implicit parameter passing]]
* [[Riel's heuristics]]
+
===[[Riel's heuristics]]===
* [[Bob Martin's principles]]:
+
===[[Bob Martin's principles]]:===
 
** (SRP) The [[Single responsibility principle]]
 
** (SRP) The [[Single responsibility principle]]
 
** (OCP) The [[Open/closed principle]]
 
** (OCP) The [[Open/closed principle]]
Line 87: Line 87:
 
** (SDP) The [[Stable dependencies principle]]
 
** (SDP) The [[Stable dependencies principle]]
 
** (SAP) The [[Stable abstractions principle]]
 
** (SAP) The [[Stable abstractions principle]]
* [[Ken Auer 1995]]:
+
===[[Ken Auer 1995]]:===
 
** [[Define classes by behavior, not state pattern]]  
 
** [[Define classes by behavior, not state pattern]]  
 
** [[Implement behavior with abstract state pattern]]  
 
** [[Implement behavior with abstract state pattern]]  
Line 96: Line 96:
 
** [[Define default values via explicit protocol pattern]]
 
** [[Define default values via explicit protocol pattern]]
 
* Alan Davis 1995:
 
* Alan Davis 1995:
* [[Code smells]]:
+
===[[Code smells]]:===
 
** [[Duplicate code smell]]
 
** [[Duplicate code smell]]
 
** [[Long method smell]]
 
** [[Long method smell]]

Revision as of 00:17, 19 September 2008

Contents

Object oriented design maxims

maxim:: (noun) A general truth or rule of conduct expressed in a sentence.

Lets use the term maxim to mean all the rules, laws, guidelines, principles, heuristics, strategies, patterns and idioms that are named by a standard phrase.

Maxims

Clumps of maxims

Johnson and Foote's heuristics:

Riel's heuristics

Bob Martin's principles:

Ken Auer 1995:

Code smells:

Personal tools