Limit hierarchy depth

From CSSEMediaWiki
Jump to: navigation, search
In practice, inheritance hierarchies should be no deeper than an average person can keep in their short term memory. A popular value for this depth is six. --Riel's Heuristic 5.5, Arthur Riel 1996

Description

This heuristic suggests that inheritance hierarchies should be be no deeper than 6 levels. This heuristic is based on empirical studies with real world design problems. It was found that the designers with the most difficulty navigating their class hierarchies were those with hierarchies of 12 to 17 levels in depth. Upon redesigning the hierarchies to use five to seven levels, the task of navigation was purportedly easier.

A Proviso

There is a proviso on the depth of six, and that is that the designers do not have class hierarchy visualisation tools available. The designers suggested that, with access to tools that aid in class hierarchy visualisation, working with deep hierarchies would become easier (see Favour deep hierarchies).

See Also

Personal tools