Sie sind auf Seite 1von 133

PLoP, October 2010

Joshua Kerievsky
Industrial Logic, Inc.
Twitter: @JoshuaKerievsky

A Timeless Way
Of Communicating
Published In 1977
Published In 1977

3 Authors
Published In 1977

3 Authors

3 Assistants
Published In 1977

3 Authors

3 Assistants

253 Patterns
Published In 1977

3 Authors

3 Assistants

253 Patterns

1171 Pages
Published In 1977

3 Authors

3 Assistants

253 Patterns

1171 Pages

Written Over 8 Years


“I believe this to be the
most important
book on architectural design
published this century.”
-Tony Ward, Architectural Design
“Alexander may be the
closest thing home design
has to a Zen master.”
-The New York Times
Pattern Forms
Clear

Rough Mature

Fuzzy
Portland Form
Portland Form
Pattern Paragraphs

Each pattern in the Portland Form makes a statement that goes something like: "such and so forces create this or that
problem, therefore, build a thing-a-ma-jig to deal with them." The pattern takes its name from the thing-a-ma-jig, the
solution.

Each pattern in the Portland Form also places itself and the forces that create it within the context of other forces, both
stronger and weaker, and the solutions they require. A wise designer resolves the stronger forces first, then goes on to
address weaker ones. Patterns capture this ordering by citing stronger and weaker patterns in opening and closing
paragraphs. The total paragraph structure ends up looking like:

• Having done so and so you now face this problem...


• Here is why the problem exists and what forces must be resolved...
Therefore:
• Make something along the following lines. I'll give you the help I can...
• Now you are ready to move on to one of the following problems...

Summary Section

Long pattern languages find groups of patterns working around similar ideas. Portland Form introduces such groups with a
summary section. This section will explain the general problem under consideration and name the patterns that address it.
Market Walkthrough
A Product Initiative will be expressed in market or business terms. A product is more than a
program or any other piece of technology. Davidow makes this clear in his book Marketing High-
Technology. It is a marketing function that makes one from the other. And marketing must have
good contact with both sides of its operations, the product's customers and the program's
developers. Likewise, development must understand the customer needs served by an initiative
and have the confidence and resources to peruse market questions as they arise.
Therefore: Begin every initiative with a walkthrough of program and product concepts involving
most of the development and marketing staffs. Understand an initiative from the buyer's and
user's perspective and from developments point of view too. Should an initiative come from or
involve contract terms, now is a good time to review them. Finally, all should agree on basic
terminology, such as that used as Implied Requirements.
Example:
A trading software company is responding to growing fear of derivative contracts by adding
improved pricing models and related analytic. The marketing department has selected key
customers with derivative portfolios and a willingness to work with development. In a market
walkthrough the company president outlines changes in the derivatives market, the New York
region customer representative summarizes the newest pricing models popular on "the street",
and the staff domain specialist outlines a vision for incorporating similar function in the
companies product. The walkthrough ends with a long question and answer period in which
marketing and development begin to match customer needs with implementation possibilities.
Copyright Ward Cunningham, Episodes: A Pattern Language of Competitive Development
Clear

Rough Mature

Fuzzy
Clear

Rough Mature

Portland

Fuzzy
Coplien Form
"... a simplified way to structure a
pattern in preparation for writing a
more literate version in
Alexandrian form.”
- Wikipedia page for Jim Coplien
Coplien Form
• Name
• Alias (optional)
• Problem
• Context
• Forces
• Solution
• Example (optional?)
• Resulting Context
• Rationale (optional)
• Known Uses
• Related Patterns
Pattern: People Know Best

Problem: How do you balance automation with human authority and responsibility?
Context: High-reliability continuous-running systems, where the system itself tries to recover from all error conditions.
Forces: People have a good subjective sense of the passage of time, and how it relates to the probability of a serious failure, or how it
will be perceived by the customer.
The system is set up to recover from failure cases. (Minimize Human Intervention)
People feel a need to intervene.
Most system errors can be traced to human error.
Solution: Assume that people know best, particularly the maintenance folks. Design the system to allow knowledgeable users to
override the automatic controls.
Example: As you escalate through the 64 states of Processor Configuration (Try All Hardware Combos), a human who understands
what's going on can intervene and stop it.
Resulting Context: People feel empowered; however, they also are responsible for their actions.
This is an absolute rule: people feel a need to intervene. There is no perfect solution for this problem, and the pattern cannot resolve all
the forces well. Fool Me Once is a partial solution, in that it doesn't give the human a chance to intervene.
Rationale: There is no try; there is only do or fail-Yoda, in Star Wars.
Consider the input command to unconditionally restore a unit. What does "unconditional" mean? Let's say that the system thinks that
the unit is powered down; what should happen when the operator asks for the unit to be restored unconditionally? Answer: try to
restore it anyhow, no excuses allowed; the fault detection hardware can always detect the powered-down condition and generate an
interrupt for the unit out of service. Why might the operator want to do this? Because it may be a problem not with the power, but with
the sensor that wrongly reports the power is off.
Notice the tension between this pattern and Minimize Human Intervention.
Author: Robert Gamoke, 1995/03/24
Clear

Rough Mature

Portland

Fuzzy
Clear

Rough Coplien Mature

Portland

Fuzzy
Gang-of-Four Form
Gang-of-Four Form
Pattern Name and Classification: A descriptive and unique name that helps in identifying and referring to the pattern.

Intent: A description of the goal behind the pattern and the reason for using it.

Also Known As: Other names for the pattern.

Motivation (Forces): A scenario consisting of a problem and a context in which this pattern can be used.

Applicability: Situations in which this pattern is usable; the context for the pattern.

Structure: A graphical representation of the pattern. Class diagrams and Interaction diagrams may be used for this purpose.

Participants: A listing of the classes and objects used in the pattern and their roles in the design.

Collaboration: A description of how classes and objects used in the pattern interact with each other.

Consequences: A description of the results, side effects, and trade offs caused by using the pattern.

Implementation: A description of an implementation of the pattern; the solution part of the pattern.

Sample Code: An illustration of how the pattern can be used in a programming language

Known Uses: Examples of real usages of the pattern.

Related Patterns: Other patterns that have some relationship with the pattern; discussion of the differences between the
pattern and similar patterns.
Facade Pattern
Facade Pattern
Facade Pattern
Facade Pattern
Clear

Rough Coplien Mature

Portland

Fuzzy
Clear

GoF

Rough Coplien Mature

Portland

Fuzzy
Alexandrian Form
159 LIGHT ON TWO SIDES
OF EVERY ROOM * *
159 LIGHT ON TWO SIDES
OF EVERY ROOM * *

“When they have a choice, people


will always gravitate to those rooms
which have light on two sides, and
leave the rooms which are lit only
from one side unused and empty.”
159 LIGHT ON TWO SIDES
OF EVERY ROOM * *
159 LIGHT ON TWO SIDES
OF EVERY ROOM * *
“Each pattern is connected
to certain larger patterns
which come above it in the
language; and to cer tain
smaller patterns which come
below it in the language.”
- A Pattern Language
1 INDEPENDENT REGIONS

61 SMALL PUBLIC SQUARES

124 ACTIVITY POCKETS

188 BED ALCOVE

253 THINGS FROM


YOUR LIFE
“Each pattern can exist in the world, only to the
extent that it is supported by other patterns...”
- A Pattern Language

No Pattern Is An Island
“For convenience & clarity,
each pattern has the same
format.”
- A Pattern Language
# * Pattern Number, Name & Confidence
# * Pattern Number, Name & Confidence
Archetypical Picture or Diagram
# * Pattern Number, Name & Confidence
Archetypical Picture or Diagram
 Context: Connection to Larger Patterns
# * Pattern Number, Name & Confidence
Archetypical Picture or Diagram
 Context: Connection to Larger Patterns


 Headline (“Essence of the Problem”)


# * Pattern Number, Name & Confidence
Archetypical Picture or Diagram
 Context: Connection to Larger Patterns


 Headline (“Essence of the Problem”)



 Body (empirical background,

  evidence, poor implementations,


range of manifestations, stories)
# * Pattern Number, Name & Confidence
Archetypical Picture or Diagram
 Context: Connection to Larger Patterns


 Headline (“Essence of the Problem”)



 Body (empirical background,

  evidence, poor implementations,


range of manifestations, stories)
 Solution (“Heart of the Pattern”)
# * Pattern Number, Name & Confidence
Archetypical Picture or Diagram
 Context: Connection to Larger Patterns


 Headline (“Essence of the Problem”)



 Body (empirical background,

  evidence, poor implementations,


range of manifestations, stories)
 Solution (“Heart of the Pattern”)
Diagram of Solution
# * Pattern Number, Name & Confidence
Archetypical Picture or Diagram
 Context: Connection to Larger Patterns


 Headline (“Essence of the Problem”)



 Body (empirical background,

  evidence, poor implementations,


range of manifestations, stories)
 Solution (“Heart of the Pattern”)

Diagram of Solution
 Context: Connection To Smaller Patterns
# *
Pattern Number, Name
& Confidence
CARRY SOME LITERATURE
You want to enrich your knowledge in an additional
and unfamiliar area...however, you are too busy to
make time for studying at your home and office.
CARRY SOME LITERATURE
You want to enrich your knowledge in an additional
and unfamiliar area...however, you are too busy to
make time for studying at your home and office.
Pattern Names Are
Nouns Not Verbs

ENRICHMENT BREAK
You want to enrich your knowledge in an additional
and unfamiliar area...however, you are too busy to
make time for studying at your home and office.
Two Asterisks **
88 STREET CAFE **
241 SEAT SPOTS **
252 POOLS OF LIGHT **

Two Asterisks **
“...solution states a true invariant, a property common
to all possible ways of solving the stated problem.”
One Asterisk
103 SMALL PARKING LOTS *
164 STREET WINDOWS *
202 BUILT-IN SEATS *

One Asterisk
“...some progress made towards identifying an
invariant: possible to improve on solution.”
No Asterisks
146 FLEXIBLE OFFICE SPACE
187 MARRIAGE BED
203 CHILD CAVES

No Asterisks
“...finding the true invariant, the property at the
heart of all possible solutions, remains undone.”
Asterisks In
A Pattern Language
53 Patterns: 84 Patterns:
No Asterisks Two Asterisks
21%
33%

116 Patterns: 46%


One Asterisk
Archetypical Picture
or Diagram
Layered Architecture
User Interface

Application

Domain

Infrastructure

Adapted from Domain-Driven Design, by Eric Evans


2 POOL OF INSIGHT * *

Context: Connection
to Larger Patterns
Pools of Insight:
A Pattern Language for Study Groups

2 POOL OF INSIGHT
3 SAFE PLACE

11 MOTIVATED MODERATOR
11 MOTIVATED MODERATOR * *

. . . the way a dialogue is directed plays a huge


role in the educational experience of
participants. If it is done poorly, the dialogue
will neither be a POOL OF INSIGHT (2) nor
a SAFE PLACE (3). This pattern describes
what kind of direction will produce valuable
educational experiences.

  

Headline
(“Essence of the Problem”)
251 DIFFERENT CHAIRS
. . . when you are ready to furnish rooms, choose the variety of
furniture as carefully as you have made the building, so that each
piece of furniture, loose or built in, has the same unique and organic
individuality as the rooms and alcoves have - each different,
according to the place it occupies - SEQUENCE OF SITTING
SPACES (142), SITTING CIRCLE (185), BUILD-IN SEATS (202)

  
People are different sizes; they sit in
different ways. And yet there is a tendency
in modern times to make all chairs alike.
A good headline
stirs emotions and
motivates people to
find solutions.
SIZE THE ORGANIZATION

Problem: How big should the


organization be?

Adapted from A Development Process Generative


Pattern Language, by James O. Coplien
SIZE THE ORGANIZATION

Problem: How big should the


organization be?

Adapted from A Development Process Generative


Pattern Language, by James O. Coplien
SIZE THE ORGANIZATION
Large software projects (greater than
25,000 lines of code) are seldom
delivered on time and within budget
when the development team is either
too large or too small.

Adapted from A Development Process Generative


Pattern Language, by James O. Coplien
Layered Architecture
In an object-oriented program, UI, database, and other support code
often gets written directly into the business objects. Additional business
logic is embedded in the behavior of UI widgets and database scripts.
This happens because it is the easiest way to make things work, in the
short run. When the domain-related code is diffused through such a
large amount of other code, it becomes extremely difficult to see and
to reason about. Superficial changes to the UI can actually change
business logic. To change a business rule may require meticulous tracing
of UI code, database code, or other program elements. Implementing
coherent, model-driven objects becomes impractical. Automated testing
is awkward. With all the technologies and logic involved in each activity,
a program must be kept very simple or it becomes impossible to
understand.

Adapted from Domain-Driven Design,


by Eric Evans
Layered Architecture
In an object-oriented program, UI, database, and other support code
often gets written directly into the business objects. Additional business
logic is embedded in the behavior of UI widgets and database scripts.
This happens because it is the easiest way to make things work, in the
short run. When the domain-related code is diffused through such a
large amount of other code, it becomes extremely difficult to see and
to reason about. Superficial changes to the UI can actually change
business logic. To change a business rule may require meticulous tracing
of UI code, database code, or other program elements. Implementing
coherent, model-driven objects becomes impractical. Automated testing
is awkward. With all the technologies and logic involved in each activity,
a program must be kept very simple or it becomes impossible to
understand.

Adapted from Domain-Driven Design,


by Eric Evans
Layered Architecture
Changing business rules that are not
implemented as coherent, model-driven
objects, but instead are intermixed with
UI, database, and other support code, is
risky, difficult and time consuming.

Adapted from Domain-Driven Design,


by Eric Evans



 



Body
empirical background, evidence,
poor implementations, range of
manifestations, stories
180 WINDOW PLACE * *
180 WINDOW PLACE * *

Low sill Bay window Glazed alcove Window seat


Composite Pattern
Compose objects into tree structures to represent
part-whole hierarchies. Composite lets clients treat
individual objects and compositions of objects uniformly.
- Design Patterns
Composite Pattern
Compose objects into tree structures to represent
part-whole hierarchies. Composite lets clients treat
individual objects and compositions of objects uniformly.
- Design Patterns
Structure
Composite Pattern
Compose objects into tree structures to represent
part-whole hierarchies. Composite lets clients treat
individual objects and compositions of objects uniformly.
- Design Patterns
Structure
Composite Pattern
Compose objects into tree structures to represent
part-whole hierarchies. Composite lets clients treat
individual objects and compositions of objects uniformly.
- Design Patterns

from Refactoring to Patterns


107 Wings of Light **
• Amos Rapoport “Some Consumer Comments on a Designed
Environment.” Arena, January 1967, pp. 176-78

• R.G. Hopkinson, “Architectual Physics: Lighting” Department of


Scientific + Industrial Research” HMSO, London, 1963, pp.
116-17

• Leslie Martin & Lionel March, “Land Use and Built Form”
Cambridge Research, Cambridge University, April 1966

• Cost Analysis - Skidmore Owings & Merrill

• R.G. Hopkinson & J.G. Kay “The Lighting of Buildings” New


York, Praeger, 1969, p. 108
241 SEAT SPOTS * *
11 Benches Observed In Berkeley, CA
Criteria For
Good Seat Spots
3 Occupied
View of Activity? 27%

In Sun? 8 Unoccupied
73%
Low wind velocity?

Solution
(“Heart of the Pattern”)
“Each solution is stated in
such a way...that you can solve
the problem in your own way
by adapting it to your
preferences and the local
conditions at the place where
you are making it.”
- A Pattern Language
180 WINDOW PLACE * *
In every room where you spend any length of
time during the day, make at least one window
into a “window place.”
180 WINDOW PLACE * *
In every room where you spend any length of
time during the day, make at least one window
into a “window place.”

Low sill Bay window Glazed alcove Window seat


252 POOLS OF LIGHT * *
Locate each room so that it has
outdoor space outside it on at least
two sides, and then place windows in
these outdoor walls so that natural
light falls into every room from more
than one direction.
Diagram of Solution
“...after the solution, there is a
diagram, which shows the
solution in the form of a
diagram, with labels to indicate
its main components.”
- A Pattern Language
37 HOUSE CLUSTER * *

3 SAFE PLACE * *

76 HOUSE FOR
A SMALL FAMILY * 7 PUBLIC LIVING ROOM *

136 COUPLES REALM *




Context:
Connection To
Smaller Patterns
“And finally . . . there is a
paragraph which ties the pattern
to all those smaller patterns in
the language, which are needed
to complete this pattern, to
embellish it, to fill it out.”
- A Pattern Language
31 PROMENADE * *
  
. . . No matter how large the promenade is, there must be
enough people coming to it to make it dense with action, and
this can be precisely calculated by the formula of
PEDESTRIAN DENSITY (123). The promenade is mainly
marked by concentrations of activity along its length -
ACTIVITY NODES (30); naturally, some of these will be open
at night - NIGHT LIFE (33); and somewhere on the
promenade there will be a concentration of shops -
SHOPPING STREET (32). It might also be appropriate to
include CARNIVAL (58) and DANCING IN THE STREET (63)
in very large promenades. The detailed physical characteristic
of the promenade is given by PEDESTRIAN STREET (100) and
PATH SHAPE (121).
# * Pattern Number, Name & Confidence
Archetypical Picture or Diagram
 Context: Connection to Larger Patterns


 Headline (“Essence of the Problem”)



 Body (background of the pattern,

  evidence for its validity and range of


different ways it may be manifested)
 Solution (“Heart of the Pattern”)

Diagram of Solution
 Context: Connection to Smaller Patterns
# * Pattern Number, Name & Confidence
Archetypical Picture or Diagram

 Headline (“Essence of the Problem”)


 Solution (“Heart of the Pattern”)
# * Pattern Number, Name & Confidence
Archetypical Picture or Diagram

 Headline (“Essence of the Problem”)


 Solution (“Heart of the Pattern”)

8 Intimate Circle * *
Awkward seating arrangements alienate people
and thwart a group’s ability to work together. The
best configurations allow participants to easily see
and hear each other. Yet many establishments
don’t provide either the furniture or space to
make this happen, or don’t let groups rearrange
the furniture.
Choose a location with ample room, many tables
and chairs, and the freedom to rearrange the
spaces to form rough circles or ovals that may
dynamically expand or contract.
# * # * # * # * # *

    
    
# * # * # * # * # *

    
    
# * # * # * # * # *

    
    
# * # * # * # * # *

    
    
Partial Pattern
Makeover
Clear

GoF

Rough Coplien Mature

Portland

Fuzzy
Clear

Alexandrian

GoF

Rough Coplien Mature

Portland

Fuzzy
A Timeless
Way Of
Communicating
Thank You

Das könnte Ihnen auch gefallen