Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
70
Other Decks in Programming
See All in Programming
20 years of Symfony, what's next?
fabpot
2
340
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
170
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
37
25k
スタートアップを支える技術戦略と組織づくり
pospome
8
16k
DSPy Meetup Tokyo #1 - はじめてのDSPy
masahiro_nishimi
1
160
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
26
22k
UIデザインに役立つ 2025年の最新CSS / The Latest CSS for UI Design 2025
clockmaker
18
7.2k
Cap'n Webについて
yusukebe
0
120
手が足りない!兼業データエンジニアに必要だったアーキテクチャと立ち回り
zinkosuke
0
580
AIコーディングエージェント(Gemini)
kondai24
0
190
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.2k
AIコーディングエージェント(skywork)
kondai24
0
150
Featured
See All Featured
Building Adaptive Systems
keathley
44
2.9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
390
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Site-Speed That Sticks
csswizardry
13
990
GraphQLとの向き合い方2022年版
quramy
50
14k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
How to Ace a Technical Interview
jacobian
280
24k
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