Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
67
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
63
Introduction to Pair Programming
cbushell
1
120
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
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
71
Other Decks in Programming
See All in Programming
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
2.5k
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
160
Github Copilotのチャット履歴ビューワーを作りました~WPF、dotnet10もあるよ~ #clrh111
katsuyuzu
0
110
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
140
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
180
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
470
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
310
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
310
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
460
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
410
20 years of Symfony, what's next?
fabpot
2
360
Featured
See All Featured
Site-Speed That Sticks
csswizardry
13
1k
KATA
mclloyd
PRO
32
15k
Building an army of robots
kneath
306
46k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
The Language of Interfaces
destraynor
162
25k
Six Lessons from altMBA
skipperchong
29
4.1k
Documentation Writing (for coders)
carmenintech
76
5.2k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
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