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
64
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
60
Introduction to Pair Programming
cbushell
1
110
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
100
Continuous Integration, fast builds and Flot
cbushell
2
58
Other Decks in Programming
See All in Programming
RuboCop: Modularity and AST Insights
koic
2
2.5k
Contribute to Comunities | React Tokyo Meetup #4 LT
sasagar
0
590
Making TCPSocket.new "Happy"!
coe401_
1
3.1k
ASP.NETアプリケーションのモダナイゼーションについて
tomokusaba
0
240
Amazon CloudWatchの地味だけど強力な機能紹介!
itotsum
0
230
Road to RubyKaigi: Making Tinny Chiptunes with Ruby
makicamel
4
540
Designing Your Organization's Test Pyramid ( #scrumniigata )
teyamagu
PRO
2
220
The Implementations of Advanced LR Parser Algorithm
junk0612
2
1.3k
オープンソースコントリビュート入門
_katsuma
0
120
Empowering Developers with HTML-Aware ERB Tooling @ RubyKaigi 2025, Matsuyama, Ehime
marcoroth
2
960
監視 やばい
syossan27
12
10k
ウォンテッドリーの「ココロオドル」モバイル開発 / Wantedly's "kokoro odoru" mobile development
kubode
1
270
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
41
2.3k
Thoughts on Productivity
jonyablonski
69
4.6k
Navigating Team Friction
lara
185
15k
How to train your dragon (web standard)
notwaldorf
91
6k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
Being A Developer After 40
akosma
91
590k
The Cost Of JavaScript in 2023
addyosmani
49
7.8k
Building Applications with DynamoDB
mza
94
6.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
How to Ace a Technical Interview
jacobian
276
23k
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