This singularity also facilitates our communal food preparation and eating customs.
When I say that I want a three-bedroom, two-bath house with an open-plan kitchen, I have
packed a huge amount of information into a short sentence, and I've avoided a lot of silly
mistakes—such as putting a toilet next to the refrigerator.
In every area of design—houses, cars, rowboats, or software—we build on patterns that have been
found
to work in the past, improvising within established themes. Sometimes we have to invent
something completely new. But by basing standard elements on patterns, we avoid wasting our
energy on problems with known solutions so that we can focus on our unusual needs. Also,
building from conventional patterns helps us avoid a design so idiosyncratic that it is difficult to
communicate.
Although software domain design is not as mature as other design fields—and in any case may be
too diverse to accommodate patterns as specific as those used for car parts or rooms—there is
nonetheless a need to move beyond "Everything is an object" to at least the equivalent of
distinguishing bolts from springs.
A form for sharing and standardizing design insight was introduced in the 1970s by a group of
architects led by Christopher Alexander (Alexander et al. 1977). Their "pattern language" wove
together tried-and-true design solutions to common problems (much more subtly than my
"kitchen" example, which has probably caused some readers of Alexander to cringe).
The intent
was that builders and users would communicate in this language, and they would be guided by the
patterns to produce beautiful buildings that worked well and felt good to the people who used
them.
Whatever architects might think of the idea, this pattern language has had a big impact on
software design. In the 1990s software patterns were applied in many ways with some success,
notably in detailed design (Gamma et al. 1995) and technical architectures (Buschmann et al.
1996). More recently, patterns have been used to document basic object-oriented design
techniques (Larman 1998) and enterprise architectures (Fowler 2002, Alur et al. 2001). The
language of patterns is now a mainstream technique for organizing software design ideas.
The pattern names are meant to become terms
in the language of the team, and I've used them
that way in this book. When a pattern name appears in a discussion, it is
FORMATTED IN SMALL CAPS
to call it out.
Here is how I've formatted patterns in this book. There is some variation around this basic plan, as
I have favored case-by-case clarity and readability over rigid structure. . . .
[ Team LiB ]