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
81
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
88
Introduction to Pair Programming
cbushell
1
140
An Introduction to BDD
cbushell
5
190
An Introduction to HTTP
cbushell
2
150
Agile Test Automation
cbushell
2
200
Working Effectively With Legacy Code
cbushell
4
260
Jasmine, BDD for JavaScript
cbushell
1
140
Branches Are For Trees. How to Develop Software Without Them
cbushell
1
130
Continuous Integration, fast builds and Flot
cbushell
2
90
Other Decks in Programming
See All in Programming
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
400
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
530
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
800
プロポーザルを書いてもらう
pvcresin
0
590
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
270
リアルな遅延を測る仕様
kota_yata
1
130
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
240
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
570
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
120
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
260
My Marp Sample
sinoue0108
0
130
Introducing Stack Pull Request in GitHub
kkamegawa
0
110
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
560
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Everyday Curiosity
cassininazir
0
300
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
500
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
510
Docker and Python
trallard
47
4.2k
A Tale of Four Properties
chriscoyier
163
24k
Between Models and Reality
mayunak
4
410
How to Think Like a Performance Engineer
csswizardry
28
2.7k
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