Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
State Pattern From GoF
Search
Chris Bushell
July 07, 2010
Programming
1
65
State Pattern From GoF
Prepared for the Melbourne Patterns Group
Chris Bushell
July 07, 2010
Tweet
Share
More Decks by Chris Bushell
See All by Chris Bushell
Test Automation for Packaged Systems: Yes You Can!
cbushell
0
61
Introduction to Pair Programming
cbushell
1
120
An Introduction to BDD
cbushell
5
160
An Introduction to HTTP
cbushell
2
130
Agile Test Automation
cbushell
2
170
Working Effectively With Legacy Code
cbushell
4
250
Jasmine, BDD for JavaScript
cbushell
1
120
Branches Are For Trees. How to Develop Software Without Them
cbushell
1
110
Continuous Integration, fast builds and Flot
cbushell
2
60
Other Decks in Programming
See All in Programming
All About Angular's New Signal Forms
manfredsteyer
PRO
0
200
あなたとKaigi on Rails / Kaigi on Rails + You
shimoju
0
180
What's new in Spring Modulith?
olivergierke
1
160
Devvox Belgium - Agentic AI Patterns
kdubois
1
140
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
440
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
140
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
880
技術的負債の正体を知って向き合う
irof
0
230
モテるデスク環境
mozumasu
3
1k
釣り地図SNSにおける有料機能の実装
nokonoko1203
0
190
品質ワークショップをやってみた
nealle
0
600
bootcamp2025_バックエンド研修_WebAPIサーバ作成.pdf
geniee_inc
0
120
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
27
2.1k
Facilitating Awesome Meetings
lara
57
6.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
How STYLIGHT went responsive
nonsquared
100
5.8k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
A Tale of Four Properties
chriscoyier
161
23k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
How to Ace a Technical Interview
jacobian
280
24k
Building Applications with DynamoDB
mza
96
6.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
Transcript
State Pa'ern From GoF Chris Bushell 7th July 2010
Mo<va<on “Allow an object to alter its behavior when
its internal state changes”
Code
Applicability • Behavior depends on state • Opera<ons
have large condi<onal statements which depend on state
Par<cipants
Collabora<ons • Context and Concrete State • Context
is primary interface for clients
Consequences • Localizes state specific behavior. Avoids code
duplica<on • State changes are well defined, atomic opera<ons • State objects can be shared
Implementa<on • Context or Concrete State defines transi<ons?
• Table based approach to defining transi<ons • Singleton, Flyweight