Design Patterns Book

ISBN 0-201-63361-2 One of the first, and most well-received books on DesignPatterns.

You can find more on the GangOfFour DesignPatterns at:

FIXME - these links are down! Original location:[patternName] e.g.

Creational (CategoryCreationalPatterns)

Structural (CategoryStructuralPatterns) Behavioral (CategoryBehavioralPatterns)


These are questionable criticisms.

First, patterns are not interchangeable, let alone on an economic basis, so "criteria for the rules or choices ... such as cost/benefit analysis" do not apply. The intent, motivation and applicability portions of a pattern description are sufficient to compel and/or inform use of a particular pattern. Using economics to decide whether to use Visitor or Singleton is akin to using economics to decide whether your new house should have a roof or a door.

Second, the DesignPatternsBook is specifically about object-oriented systems and general-purpose programming. Database and CrudScreen-centric applications almost certainly need their own PatternLanguage. Perhaps you could write it?

I do not believe it explicitly limits its domain scope.

It implicitly limits its design scope. You use a general-purpose OO language to build a DBMS, not as a DBMS.

Sorry, you lost me. There is usually at least a fair amount of imperative coding in most CRUD apps.

You complained that the book ignored database and CrudScreen-centric applications. Unless you're using an OODBMS -- for which the book and its patterns certainly apply -- you wouldn't use OO patterns to write SQL queries or paint screens and fill in event handlers. OO is used to build the tools that let you write SQL queries and paint screens and fill in event handlers.

Where in the book does it suggest not to use OOP to write the client-side of SQL-centric apps?

It doesn't, and for OO client-side, SQL-centric apps the OO design patterns most certainly do apply.

Then why not more examples from that domain? Why only include examples from SystemsSoftware? If you have 30 examples, it would make sense to distribute those examples among at least a half-dozen common domains rather than make all 30 in one domain. That's not rational unless being chinsy is your primary goal.

The examples are intended to be generically illustrative without being domain specific. I don't recall any games, graphics, or geographical computing, either.

Which is perhaps part of the weakness.

If the reader cannot apply generically illustrative examples to his or her specific domain, he or she has problems that neither this book nor any other can solve.

I'm guilty then. I couldn't do it. That's mostly moot anyhow, one ideally should choose a wide variety of domains for examples unless they explicit target a domain set (and should state so). I'm not burning the book, just knocking off some points for using narrow examples. No reason to get upset about that. You seem to be suggesting the reader should be expected to compensate for that gap by being smarter, but we are not rating readers here.

Choosing a wide variety of domains inevitably demands explanations about the domain that are otherwise irrelevant. Really, if you can't apply generic examples to your domain, that's a problem with you or your domain. Or both. Don't expect the authors of a book to fix that for you. Man up and fix it yourself.

It would not be much to briefly suggest and compare non-OOP alternatives or competitors to OO patterns.

{Then feel free to do so. But it's still outside the scope of the book in question.}

Indeed. I wonder if Top thinks the Haynes repair guide for his car should also briefly suggest and compare appliance repair, too.

The analogy would only work if your washing machine is used for human transportation. Different paradigms are used mostly for the same purpose.

So should the Haynes repair guide for your Chevy Vega briefly suggest and compare motorcycle repair? They're both used for human transportation.

See also ShowTrialOfTheGangOfFour, ShowTrialVerdict, PatternBacklash, CommentOnCriticismOfTheGangOfFour, DismissalOfSubjectExperts

See also: PatternRelatedBookList

CategoryBook, CategoryPattern


EditText of this page (last edited March 1, 2014) or FindPage with title or text search