Structure Diagram Considered Harmful

JoshuaKerievsky wrote an article about the Structure Diagrams in GangOfFour DesignPatterns, called "GoF Structure Diagram Considered Harmful" <http://industriallogic.com/pulse/20001001.html>:

"This "Structure" section title is misleading because it suggests that there is only one Structure of a Pattern, while in fact there are many structures and ways to implement each Pattern."

JohnVlissides touches the subject in a C++ Report article <http://www.research.ibm.com/designpatterns/pubs/ph-apr98.pdf>:

"The symptoms are obvious. Someone asks whether a minor deviation from the pattern's Structure diagram means he's "not following the pattern.""


But they're not harmful in the same sense that "goto" is considered harmful: It's only an issue that some beginners are mislead by clear diagrams after suffering from a failure of reading skills.

Clarifying the diagrams by calling them "example diagrams" would help, as would showing several variations instead of just the one most common realization. But you'll continue to have problems for as long as people refuse to read the directions. --AnonymousDonor

Indeed, Kerievsky's article isn't in the "goto" sense. Instead he proposes that the problem should be solved by having multiple diagrams in the pattern description, to emphasize that they're just examples. --AndersBengtsson


Reminds me of FearOfAddingClasses -- which can be cured by the experience of adding classes and observing how they make life easier. -- JeffGrigg


See also: DesignPatterns


CategoryConsideredHarmful


EditText of this page (last edited September 30, 2003) or FindPage with title or text search