Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
State Pattern From GoF
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Chris Bushell
July 07, 2010
Programming
82
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
92
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
210
Working Effectively With Legacy Code
cbushell
4
270
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
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
130
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
520
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
160
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
730
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
120
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
210
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
300
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
150
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
120
Building an Out-of-Order CPU
latte72
1
790
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
360
Heart of Swift Concurrency
koher
0
910
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
280
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
My Coaching Mixtape
mlcsv
0
320
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Building the Perfect Custom Keyboard
takai
2
880
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
600
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
240
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
680
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