Distribute system intelligence
From CSSEMediaWiki
Revision as of 08:33, 7 October 2008 by Tureiti Keith (Talk | contribs)
Riel's heuristic #3.1 Distribute system intelligence horizontally as uniformly as possible, that is, the top-level classes in a design should share the work uniformly
Description
From chapter 3.3 of [1], Riel describes the "god class problem":
The behavioral form of the god class problem is caused by a common error among action-oriented developers in the process of moving to the object-oriented paradigm. These developers attempt to capture the central control mechanism so prevalent in the action-oriented paradigm within their object-oriented design. The result is the creation of a god object that performs most of the work, leaving minor details to a collection of trivial classes. There are a number of heuristics that work together cooperatively toward the avoidance of these classes.
Riel then states the following heuristics:
- Distribute system intelligence horizontally as uniformly as possible, that is, the top-level classes in a design should share the work uniformly
References
- ^ Riel, A. J. 1996 Object-Oriented Design Heuristics. 1st. Addison-Wesley Longman Publishing Co., Inc.