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
77
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
82
Introduction to Pair Programming
cbushell
1
140
An Introduction to BDD
cbushell
5
180
An Introduction to HTTP
cbushell
2
140
Agile Test Automation
cbushell
2
190
Working Effectively With Legacy Code
cbushell
4
260
Jasmine, BDD for JavaScript
cbushell
1
130
Branches Are For Trees. How to Develop Software Without Them
cbushell
1
120
Continuous Integration, fast builds and Flot
cbushell
2
84
Other Decks in Programming
See All in Programming
スマートグラスで並列バイブコーディング
hyshu
0
230
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
290
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
170
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.7k
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
250
RTSPクライアントを自作してみた話
simotin13
0
620
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
720
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
200
CSC307 Lecture 17
javiergs
PRO
0
320
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.2k
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
250
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
210
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
340
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Paper Plane
katiecoart
PRO
1
51k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
The untapped power of vector embeddings
frankvandijk
2
1.8k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
150
Visualization
eitanlees
152
17k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
200
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