Professional Documents
Culture Documents
Pattern Languages
Pattern Languages
seminar contents.
The History of Patterns
Patterns and Pattern Languages
Patterns in Software Engineering / Computer Science
Researching
Questions...?
christopher alexander.
1936 Austria, B.Sc. architecture, M.Sc. in mathematics.
First Ph.D. in architecture ever awarded at Harvard University.
1st book by author to influence CS: Notes on the Synthesis of Form.
Required reading for researchers in computer science in the '60s.
Recomended by Marvin Minsky, founder of MIT's AI Lab, to his students.
Heavy influence in the 60s & 70s programming language design,
modular programming, object-oriented programming, software
engineering and other design methodologies.
... and all of their books were about civil architecture.
4
design.
What makes a good design? what is a good solution?
Can we design everything from scratch? by intuition? total control?
Can we measure design? can we afford not to?
performance
-
simplicity
+
jointing
-
economy
seminar contents.
The History of Patterns
Patterns and Pattern Languages
Patterns in Software Engineering / Computer Science
Researching
Questions...?
definition.
A Pattern is seen in the wild.
A Pattern addresses a recurrent problem.
A Pattern is a recognized good solution...
... and by good we mean balanced within the defined context.
A Pattern is more than a description: its a prescription.
A Pattern catalogue is a set of patterns from the same domain.
A Pattern language defines the relationship between each pattern.
myths.
A Pattern is not a foundamental building block.
A Pattern is not a recipee.
A Pattern is not a novel idea.
Patterns aren't about Object Oriented design (more later).
Patterns aren't about UML (more later).
A Pattern should evoke an "Ahah!", not an "Uhuh..."
Who is the target audience, then? Practictioners of the Art...
Though, Alexander believed everyone could use a pattern; this was
maybe its single biggest misconception. cf. The Oregon Experience.
9
anti-patterns.
Good solutions are called a pattern.
A recurrent, bad solution, is an anti-pattern.
Why document bad solutions:
Because they are recurrent.
Because it seem obviously good, but is unpredictably bad.
Because it points to a transformation to a better solution.
Some authors in the pattern community argue that a good pattern is a
consequence, or refers to, an anti-pattern (disputed point-of-view).
10
anatomy of a pattern.
Name. Usually a noun catchy phrase
that describes what the pattern builds.
Aliases. Also known as...
Context. Describe the setting for the
problem. Include a description of the
target user.
Forces. Why the problem is not trivial.
Discuss other possible solutions and why
they wont work.
Problem. Unbiased by the solution.
Solution. Include enough detail so the
user can implement the solution, but
dont restrict the pattern to a narrow list
of specifics.
11
seminar contents.
The History of Patterns
Patterns and Pattern Languages
Patterns in Software Engineering / Computer Science
Researching
Questions...?
13
software quality.
In software, the process of design is influenced by a set of forces
known as quality attributes.
A particular solution is a balance between relevant forces.
How can we quantify those forces?
Which can be measured/asserted during the design phase?
What about qualitative forces?
What about QWAN?
Is software development a pure scientific activity? Can we afford
not to?
Knuth, Donald. The Art of Computer Programming.
14
customizability
maintainability
robustness
accountability
degradability
manageability
safety
accuracy
demonstrability
mobility
scalability
adaptability
dependability
modularity
seamlessness
administrability
deployability
nomadicity
affordability
distributability
operability
serviceability (a.k.a.
supportability)
agility
durability
portability
securability
auditability
evolvability
precision
simplicity
availability
extensibility
predictability
stability
credibility
fidelity
recoverability
survivability
standards compliance
flexibility
relevance
sustainability
process capabilities
installability
reliability
tailorability
compatibility
integrity
repeatability
testability
composability
interchangeability
reproducibility
timeliness
configurability
interoperability
responsiveness
understandability
correctness
learnability
reusability
usability
15
Proxy,
Decorator,
Composite,
State,
Adapter,
Faade,
Bridge,
Flyweight,
Abstract Factory,
Factory method,
...
16
Reflection,
Whole-part,
Blackboard,
Master-slave,
Broker,
Proxy,
Model-View-Controller,
Command Processor,
Presentation-Abstraction-Control,
View Handler,
Microkernel,
...
17
domain-specific patterns.
There are several books and pattern languages that focus on specific
domains such as:
Distributed systems,
Documentation,
Adaptive systems,
Frameworks,
Requirements engineering,
Interaction design,
Sociology,
Pedagogical,
Psychology,
...
functional languages.
If you are a FP proponent, and are still wondering if they make
sense in that domain...
1. Eugene Wallingford. Functional Programming Patterns and Their Role in Instruction.
http://www.cs.uni.edu/~wallingf/patterns/papers/fdpe2002/fdpe2002-long.pdf
2. Sergio Antoy. A Catalog of Design Patterns in FLP. http://web.cecs.pdx.edu/~antoy/
flp/patterns/
Always remember:
A Pattern is NOT the implementation.
There are forces which are not quantitative, thus cannot be
parameterized.
Each pattern is defined within a particular domain: it may be
pointless to transpose it into a similar domain.
19
seminar contents.
The History of Patterns
Patterns and Pattern Languages
Patterns in Software Engineering / Computer Science
Researching
Questions...?
20
21
pattern mining.
(a) Pick a whole area, not just one idea.
(b) Make a list of all the little things you have learned through the years
about the area.
(c) Cast each item on your list as a solution.
(d) Now write each item as a pattern.
(f) Now write an introduction to your pattern language that hints at the
forces you will be addressing.
(g) Pick a good name too.
22
Resources
24
references.
1. Christopher Alexander. Notes on the Synthesis of Form. Harvard University Press, 1964.
2. Christopher Alexander. A Pattern Language: Towns, Buildings, Construction. Oxford University Press,
1977.
3. Christopher Alexander. The Timeless Way of Building. Oxford University Press, 1979.
4. Kent and Cunningham. Using Pattern Languages for Object-Oriented Program. OOPSLA workshop on
Specification and Design for Object-Oriented Programming, 1987.
5. Gamma et al. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley
Professional, 1994.
6. Buschmann et al. Pattern Oriented Software Architecture, Volumes 1-5. Wiley, 1996 - 2007.
7. Brown et al. AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis. Wiley, 1998.
8. Richard P. Gabriel. Writers Workshops As Scientific Methodology. http://www.dreamsongs.com/Files/
WritersWorkshops.pdf
9. Meszaros and Doble. A Pattern Language for Pattern Writing. http://www.hillside.net/patterns/writing/
patternwritingpaper.htm
10. Harrison, Neil. A Pattern Language for Shepherds and Sheep. http://homepages.mcs.vuw.ac.nz/~kplop/
Shp.html
11. Wolfgang Pree. A Means For Capturing the Essentials of Reusable Object-Oriented Design.
12. The Hillside Group. http://www.hillside.net/
25
seminar contents.
The History of Patterns
Patterns and Pattern Languages
Patterns in Software Engineering / Computer Science
Researching
Questions...?
26