Split large classes

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(New page: A large class generally represents a poor design. A class should represent an abstraction, and the larger the class the more complicated the abstraction. It is more likely that a large cla...)
 
Line 1: Line 1:
A large class generally represents a poor design. A class should represent an abstraction, and the larger the class the more complicated the abstraction. It is more likely that a large class is representing several abstractions and should be split up into the separate abstractions.
+
A large class generally represents a poor design. A class should represent an abstraction, and the larger the class the more complicated the abstraction. It is likely that any class containing 50 methods is representing several abstractions and should be split up into the separate abstractions. [[Johnson and Foote 1988]] states that "Large classes should be viewed with suspicion and held to be guilty of poor design until proven innocent".
  
 
== See Also ==
 
== See Also ==
 
* [[Large class smell]]
 
* [[Large class smell]]
 +
 +
[[Category: Johnson and Foote's heuristics]]

Revision as of 01:31, 18 August 2009

A large class generally represents a poor design. A class should represent an abstraction, and the larger the class the more complicated the abstraction. It is likely that any class containing 50 methods is representing several abstractions and should be split up into the separate abstractions. Johnson and Foote 1988 states that "Large classes should be viewed with suspicion and held to be guilty of poor design until proven innocent".

See Also

Personal tools