“Design Patterns” 15th Anniversary

October 26th, 2009  |  Published in book, commentary, patterns  |  7 Comments  |  Bookmark on Pinboard.in

It’s been 15 years since the publication of the seminal Gang of Four Design Patterns book. Since I was a reviewer of the original manuscript and also have a quote on the back cover of the book, the publisher recently asked me if I would write my thoughts about how I view the book today and how I think it’s affected software development over the past 15 years. You can find my essay along with essays by Linda Rising and Josh Bloch on the 15th anniversary web page for the book. There’s also an interview with the authors linked there, which I found interesting in part because of the similarity between what the authors say about patterns and functional languages and what I wrote in my essay on the same topic.

Responses

  1. Nick says:

    October 27th, 2009 at 6:51 pm (#)

    Re: “patterns have existed for a long time in FP, and most of the time they’re just part of the language.”

    As someone from the OO universe and with only limited experience of FP I am still pretty confused about DPs in FP. Clearly, the book was about OO patterns. But I have not seen any serious discussions of topics such as “DPs for FP languages, especially language-independent” or FP analogs of multiple OO development methodologies (from RUP&UML to DDD).

    Does it mean that FP magically avoids all the problems addressed by dozens of books on OO/DPs/etc? Or something like the SICP book implicitly addresses such concerns? Are OO people a self-selected group of alternatively gifted who need numerous books on trivial matters while FP folks learn by osmosis?

    I can certainly see certain common themes discussed in such different books as SICP and the recent http://www.amazon.com/Functional-Programming-Real-World-Examples/dp/1933988924 so some idioms/DPs seem to exist in the FP world as well.

    Would you mind elaborating on it a little bit?

  2. steve says:

    October 28th, 2009 at 12:22 am (#)

    @Nick: thanks for your comment. One of the best sources of information on this topic is Peter Norvig‘s Design Patterns in Dynamic Programming. Even though it’s 13 years old, I think it’ll go a long way to answering all your questions.

  3. Darach says:

    October 28th, 2009 at 8:51 pm (#)

    15 years already, seems like yesterday! Despite GoF being OO centric I’ve never had any trouble ‘translating’ them to FP or to CEP or event/stream-oriented languages.

    There’s certainly a lot more boilerplate required in the OO forms. I agree that FP aren’t necessarily required in FP/EDA as much as in OO. But GoF succeeded most of all in providing a lingua franca for programmers/architects to communicate more effectively by sharing a common understanding and foundation.

    Nice essay.

    Cheers,

    Darach

  4. Anthony Tarlano says:

    October 30th, 2009 at 7:37 am (#)

    Steve,

    I am sure that you are aware of Richard P. Gabriel’s “Worse is Better” vs. “The Right Thing” essay http://www.dreamsongs.com/WIB.html

    and maybe you even know his “Theory of Technology Acceptance” from his 1990’s “Models of Software Acceptance: How Winners Win” slide deck http://www.dreamsongs.com/Files/AcceptanceModels.pdf

    I believe if you look at Gabriel’s “Theory of Technology Acceptance” and plugin pure/non-pure FP Languages vs. OO languages + FP constructs (Such as VB.NET or C# 3.0 with LINQ which is Haskel’s Monads) then you might find that the future just might be dominated by “Worse is Better” OO languages + FP constructs, and not “The Right Thing” FP languages, so patterns just might be with us for longer than you might think.

    All the best,

    Tony

  5. steve says:

    October 30th, 2009 at 10:30 am (#)

    @Tony: while there may be a “dominant” language in the industry at one point or another, I personally use multiple languages, regardless of their perceived popularity, to best solve problems.

    For example, Erlang will continue to play a huge role in any projects I’m involved in for the foreseeable future, at my current employer or at any future employers, regardless of how “dominant” it is, and that’s perfectly acceptable for the type of people for whom I like to work because they see the clear values of productivity, reliability, concurrency, hot upgrading, speed of development, maintainability, and code brevity that Erlang brings to production systems. I’ll continue to use Perl and Python and Ruby and Tcl wherever they fit well. I’ll apply Java (if possible via Clojure, Scala, or Jython) or C++ or C if I need them. I don’t use Haskell or OCaml in production today but it could happen in the future. (I don’t touch Windows anymore so I don’t mention any F#, C#, etc.) It’s all about getting there quickly with a system that performs well without acquiring an unmaintainable mess along the way.

    Worrying about what language is “dominant” is pretty pointless, don’t you think? Seems like that way of thinking would apply best to people who think building a system is most effectively accomplished by paying 100 developers of average or less capability rather than paying 10 great developers.

    And finally, I don’t believe I said or implied anything about patterns going away. I simply said that the GoF “Design Patterns” were focused on OO, not FP, and that different patterns exist for the latter, often built into the languages themselves. In their interview I linked to, the GoF authors expressed similar thoughts, and of course Peter Norvig’s presentation linked in a previous comment pretty much says it all.

  6. Anthony Tarlano says:

    November 2nd, 2009 at 7:14 am (#)

    Steve,

    I am surprised you think my comment had anything to do with a dominate language, since as you know I use many types of languages, don’t believe in “one true way”, and even turned you on to Python, and believe that I am pragmatic..

    Having said that, and looking past languages, do think trends happen and I think there is a current evolution trend emerging in OO languages.

    What I see it that OO languages that use either lazy dynamic runtime typing or eager compile time typing, are being increasingly be influenced by FP constructs for working with collections of values, immutability, pattern matching for dispatch, strong typing with type inference, higher-order functions, lazy evaluation, Monadic effects to specify side-effects, etc..

    What I was trying to point out is that I am inclined to think right now that OO languages + these FP features and using an FP style is a more likely to be the evolutionary trend then a move away from OO toward the list of functional languages that you have in your essay. Thus I think the programmer will get to choose their own way to architect their solutions using patterns that might be more OO then FP or more FP then OO.

    Tony

  7. steve says:

    November 2nd, 2009 at 12:23 pm (#)

    @Tony: I think it depends on the language and the scenario. In my experience, OO developers who come to FP quickly lose the OO and latch onto the FP, and they don’t look back. But if they were using a language that supports both OO and FP, then sure, they’d use both, but IMO they’d do so only because it was possible, not because it’s a better way.