Code Watch: Design patterns stand the test of time
April 18, 2013 —
(Page 1 of 3)
Related Search Term(s): design patterns, object-orientations, object-oriented programming
Not long ago, a young colleague tweeted the cover of a book she'd just purchased. You may have heard of it: "Design Patterns: Elements of Reusable Object-Oriented Software," by Erich Gamma, Richard Helm, Ralph Johnson and the late John Vlissides. The book is one of the true landmark development texts of the past 20 years, to the point where "The Gang of Four book" can now be generally referred to by simply saying "GoF."
I was dismayed by some of the reactions to her tweet; while there were several "Oh yeah!" responses, there was another vein of responses that lamented her choice. This was not an isolated incident, either: Most public discussions of design patterns will now bring up skeptical, even hostile, viewpoints. What's going on?
First, a bit of history. In the early 1990s, object-orientation was sweeping like a wildfire into the world of software development, largely in the form of C++, but also with a flurry of interest in object-oriented Pascal variants like Delphi, the "pure OOP" language of Smalltalk, and short-lived but very interesting alternatives like Actor. At the same time, people had to deal with the sudden demand for GUI applications (similar to the current explosion in demand for mobile). But vocabulary, both in terms of text and graphical notation, was a huge challenge: Some people said "instance," some said "object," some said "function," some said "method." Graphically, you could choose among Booch, Constantine, Rumbaugh, Page-Jones, and probably half a dozen I no longer remember.
Meanwhile, there was a belief (perhaps more of a wish) that many hard problems of application complexity would go away by "emergent" behavior that would grow from simple-to-write small objects. That belief was bolstered by the writings of Christopher Alexander, a Berkeley-based architect and academic, whose books, starting with "The Timeless Way of Building" and "A Pattern Language: Towns, Buildings, Construction," advocated physical architecture acknowledging the "wisdom of the user," which he based on observing successful communities. The software community seized on Alexander's ideas, particularly the idea of so-called "generative patterns" that could be used to produce solutions to concrete design problems.