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
68
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
63
Introduction to Pair Programming
cbushell
1
120
An Introduction to BDD
cbushell
5
170
An Introduction to HTTP
cbushell
2
130
Agile Test Automation
cbushell
2
180
Working Effectively With Legacy Code
cbushell
4
250
Jasmine, BDD for JavaScript
cbushell
1
130
Branches Are For Trees. How to Develop Software Without Them
cbushell
1
110
Continuous Integration, fast builds and Flot
cbushell
2
74
Other Decks in Programming
See All in Programming
Apache Iceberg V3 and migration to V3
tomtanaka
0
120
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
260
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
200
ThorVG Viewer In VS Code
nors
0
760
AIエージェントの設計で注意するべきポイント6選
har1101
7
3.3k
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
390
AgentCoreとHuman in the Loop
har1101
5
210
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1k
SourceGeneratorのススメ
htkym
0
170
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
220
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
200
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
45
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
170
Information Architects: The Missing Link in Design Systems
soysaucechin
0
750
Six Lessons from altMBA
skipperchong
29
4.1k
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