The Evolution of Design Patterns
January 31st, 2006Rebecca Wirfs-Brock suggests that it may be time for the GoF Design Patterns book to be refreshed. She points out that the C++ and graphics programming examples may be less relevant to today’s C# and Java programmers. She implies that state of the art has advanced in the twelve years since the book was written. She also suggests that the GoF authors may have made some of the wrong tradeoffs when they specified some of the patterns.
I know I would like to see an update to this groundbreaking work with more modern interpretations of what have become the canonical patterns.
Rebecca talks about how the interface type has come to replace the C++ abstract class. One area that I am interested in is how Duck typing may replace the interface construct in many of the classic patterns. I’m not sure that patterns intended for statically typed languages such as C++ and java necessarily have the same implementation in dynamically typed languages, such as smalltalk, Ruby and of course, PHP.
For the last few weeks, I’ve been doing an interesting educational exercise. I’ve been simultaneously reading Design Patterns, Refactoring, Refactoring to Patterns, and Agile Software Development. I’m finding the cross-referencing between each of these highly complementary books to be be educational. I’m hoping to add Design Patterns Smalltalk Companion and PHP|Architect’s Guide to PHP Design Patterns (Jason Sweat’s book) to get a more dynamic perspective in the mix. This is my reading project for the next few months.
That 10 years after first reading the Design Patterns book, i am still studying from it shows how much of a classic this book has become.
January 31st, 2006 at 3:16 pm
Design Patterns are workarounds for broken languages like Java and, sorry, PHP. Have a look at http://www.norvig.com/design-patterns/ppframe.htm and http://www.sitepoint.com/blogs/2006/01/16/design-patterns-in-dynamic-programming/
In Smalltalk, Lisp, and Ruby you don’t need any Patterns, they are in the language.
In PHP you cannot implement a Factory-Pattern (http://blog.joshuaeichorn.com/archives/2006/01/09/zactiverecord-cant-work/) you *must* use Java-like workarounds (http://www.phppatterns.com/docs/design/the_factory_method)
March 10th, 2006 at 2:39 am
simply put you cannot change design patterns (GoF) as to do so would completely negate the knowledge that this book gives you on this subject.
no one can fault the book, past or present so why ruin an enjoyable read?
April 13th, 2007 at 9:15 am
I also like using php design patterns. Here is a new site, that I found: http://php-design-patterns.com
Check it out, it may also be of interest.