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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Chris Bushell
July 07, 2010
Programming
73
1
Share
State Pattern From GoF
Prepared for the Melbourne Patterns Group
Chris Bushell
July 07, 2010
More Decks by Chris Bushell
See All by Chris Bushell
Test Automation for Packaged Systems: Yes You Can!
cbushell
0
70
Introduction to Pair Programming
cbushell
1
130
An Introduction to BDD
cbushell
5
170
An Introduction to HTTP
cbushell
2
130
Agile Test Automation
cbushell
2
180
Working Effectively With Legacy Code
cbushell
4
260
Jasmine, BDD for JavaScript
cbushell
1
130
Branches Are For Trees. How to Develop Software Without Them
cbushell
1
120
Continuous Integration, fast builds and Flot
cbushell
2
79
Other Decks in Programming
See All in Programming
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
1.6k
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
260
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
140
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
250
第3木曜LT会 #28
tinykitten
PRO
0
120
PHPでローカル環境用のSSL/TLS証明書を発行することはできるのか? #phpconkagawa
akase244
0
330
Road to RubyKaigi: Play Hard(ware)
makicamel
1
550
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.4k
AIを導入する前にやるべきこと
negima
2
330
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
2.8k
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
490
AI-DLC Deep Dive
yuukiyo
9
5.6k
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
Leo the Paperboy
mayatellez
7
1.7k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
130
Designing Powerful Visuals for Engaging Learning
tmiket
1
360
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
The Pragmatic Product Professional
lauravandoore
37
7.3k
Mind Mapping
helmedeiros
PRO
1
180
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
370
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
910
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
140
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