What are Design Patterns?
- Design is about finding solutions
- Designers often reinvent
- significant effort
- often reinvent mistakes too!
- Design patterns communicate common design problems and good solutions
- Explains what the problem is
- Names the solution
- Explains why it's solved this way
- How to reuse
- Connections to other patterns
- Usually concrete
- implementable description of a solution
- not just guidelines for how to find a solution
When?
- First used in architecture
- E.g., how to create a hall for socializing
- Beer hall pattern
- A few activities spread out, criss-cross paths to encourage meetings
Why?
- Coming up with novel solutions is hard
- Save it for where it's important
- Don't reinvent the wheel
- More likely to be a tested design
- Taking patterns from large companies
- Likely spent a lot of design time and money
- And evolved based on usage
- Consistency
- User spend more time on other sites than yours
- Improves learnability
- Raises level of abstraction for communication
- Common vocabulary for design team
- No
<shoppingcart>
or <navbar>
tags in HTML
- But they're design patterns
- Over time, can steer syntax, e.g.
<nav>
...T. S. Eliot, W. H. Davenport Adams, Lionel Trilling, Igor Stravinsky, William Faulkner...
How?
- Not too general or too specific
- Use a solution "a million times over, without ever doing it the same way twice" (architecture book)
- Don't directly copy, but take inspiration
![](img/beer-pattern.jpg)
Exercise
- Spend a few minutes hunting some more patterns
- Identify:
- Design problem
- Design solution
- Pattern name
Resources