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
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
The Less-Told Story of Socket Timeouts
coe401_
3
970
ソースコード→AST→オペコード、の旅を覗いてみる
o0h
PRO
1
120
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
4
1.4k
PHPでローカル環境用のSSL/TLS証明書を発行することはできるのか? #phpconkagawa
akase244
0
330
実用!Hono RPC2026
yodaka
2
300
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
480
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
190
Making the RBS Parser Faster
soutaro
0
660
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
490
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
21
11k
tRPCの概要と少しだけパフォーマンス
misoton665
2
260
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
320
From π to Pie charts
rasagy
0
180
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
560
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Un-Boring Meetings
codingconduct
0
280
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
170
Odyssey Design
rkendrick25
PRO
2
610
Abbi's Birthday
coloredviolet
2
7.4k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
190
Speed Design
sergeychernyshev
33
1.6k
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