Professional Documents
Culture Documents
net/publication/220424606
The Pros and Cons of Adopting and Applying Design Patterns in the Real
World
CITATIONS READS
64 5,523
1 author:
Marshall Cline
14 PUBLICATIONS 303 CITATIONS
SEE PROFILE
All content following this page was uploaded by Marshall Cline on 16 June 2014.
M a r s h a l l P. C l i n e
patterns are a valuable lifecycle. Even though the patterns requires that the design patterns be
D
ESIGN
tool for the practicing software and their names were different part of one’s flesh and blood—
professional. There are a num- from those in standard use today looking things up in a book would
ber of pragmatic benefits from (they were largely reinvented by the be completely unacceptable in
using design patterns, and, not author, since the project predated these on-the-fly situations.
surprisingly, there are also a the standard design patterns text
number of common problems. [3] by several years), they were Design patterns can be used to give the
This sidebar shows project man- nonetheless uniform across the software a hinge. One of the great
agers and object-oriented (OO) project teams, and this uniformity lies about OO is that it can be used
designers some of the organization- allowed the developers to commu- to build arbitrarily adaptable soft-
al as well as technical issues that nicate at a higher level of abstrac- ware. In reality, adaptability must
come up when design patterns are tion. Design patterns were an be explicitly designed into the soft-
introduced into a software produc- important component to the over- ware in designated places. OO soft-
tion shop. all success of this project [1]. ware is more like a human body
than a piece of silly putty: rather
Practical Benefits: Design patterns can be used reactively. than being arbitrarily adaptable
Design patterns coordinate the entire Design patterns can be used as a along every possible direction, it
process and community. Design pat- documentation tool to classify the has hinges or hot spots [4] in those
terns provide a standard vocabulary fragments of a design, making it specific, designated places where
among developers. They provide a easier for a team to absorb new the software is designed to
list of things to look for during a developers. For example, many of bend/adapt. Future changes con-
design review and a list of things the team’s design philosophies are sistent with one of these hinges are
that must be taught in a course on captured explicitly rather than relatively inexpensive, but forcing
OO design. They communicate strictly being in the heads of the the software to change in other
information between designer, pro- original team. ways is like bending your elbow
grammer, and maintenance pro- backwards; the system normally
grammer at a significantly higher Design patterns can be used proactively. breaks.
level than individual classes or func- Patterns are more than a documen- For example, if a customer wants
tions. tation tool. In addition, they can be to add new kinds of Foibles and/or
These advantages of design pat- used to build robust designs with customize the way Foibles are dis-
terns scale well to large organiza- design-level parts that have well played, it may be possible to build a
tions. We have applied them on a understood trade-offs. Using business case that justifies the
three-year project with 150 design patterns this way requires added expense of reducing the cost
OO/C++ developers. Almost every the designer to perform a degree of to add Foibles and/or change their
developer was trained and men- high-level pattern matching, as well display. These are two hinges; they
tored using a uniform set of design as to have the ability to abstract the are places where the software is
patterns, and these patterns were essence of the design problem from designed to bend over time. Each
used throughout the development the morass of details. It also of these hinges will probably be
q,q,q.q,q,q.q,q,q.q,q,q.q,q,q.q,q,q.q,
,q,q.
designer should learn
have a nine-month event horizon;
their job is to build it; they are not
rewarded if version two is cheap,
concern here is not that a change
may break another functional
requirement. The concern is that
q,q,q
how to apply design
nor are they penalized if version
two is expensive).
a change may remove the soft-
ware’s ability to bend in ways that
.q,q,
Despite our failure as an indus- it was previously able to bend.
try to adequately manage hinges, Since few testing methodologies
they are extraordinarily impor- explicitly test the hinges, mainte-
q.q,q patterns.
tant, especially in today’s rapidly
changing business environment.
If a software system is not adapt-
nance programmers are rarely
aware of the damage they have
wrought.
q,q,q.q,q,q.q,q,q.q,q,q.q,q,q.q,q,q.q,
,q,q.q,q,q.q,q,q.q,q,q.q,q,q.q,.q,q.q,