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
65
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
61
Introduction to Pair Programming
cbushell
1
120
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
110
Continuous Integration, fast builds and Flot
cbushell
2
60
Other Decks in Programming
See All in Programming
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
380
兎に角、コードレビュー
mitohato14
0
160
UbieのAIパートナーを支えるコンテキストエンジニアリング実践
syucream
2
790
tool ディレクティブを導入してみた感想
sgash708
1
160
TROCCO×dbtで実現する人にもAIにもやさしいデータ基盤
nealle
0
390
Honoアップデート 2025年夏
yusukebe
1
880
パスタの技術
yusukebe
1
550
コンテキストエンジニアリング Cursor編
kinopeee
1
730
AI時代に学習する意味はあるのか?
tomoyakamaji
0
100
STUNMESH-go: Wireguard NAT穿隧工具的源起與介紹
tjjh89017
0
390
マイコンでもRustのtestがしたい その2/KernelVM Tokyo 18
tnishinaga
2
2.4k
FindyにおけるTakumi活用と脆弱性管理のこれから
rvirus0817
0
260
Featured
See All Featured
It's Worth the Effort
3n
187
28k
[RailsConf 2023] Rails as a piece of cake
palkan
56
5.8k
Embracing the Ebb and Flow
colly
87
4.8k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
Git: the NoSQL Database
bkeepers
PRO
431
66k
GitHub's CSS Performance
jonrohan
1032
460k
Designing Experiences People Love
moore
142
24k
Become a Pro
speakerdeck
PRO
29
5.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.6k
Making the Leap to Tech Lead
cromwellryan
134
9.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
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