Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
67
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
120
Branches Are For Trees. How to Develop Software Without Them
cbushell
1
110
Continuous Integration, fast builds and Flot
cbushell
2
70
Other Decks in Programming
See All in Programming
開発に寄りそう自動テストの実現
goyoki
1
740
React Native New Architecture 移行実践報告
taminif
1
150
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
8
5.4k
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
110
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
110
20 years of Symfony, what's next?
fabpot
2
340
Level up your Gemini CLI - D&D Style!
palladius
1
180
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
430
AWS CDKの推しポイントN選
akihisaikeda
1
240
生成AIを利用するだけでなく、投資できる組織へ
pospome
0
160
STYLE
koic
0
140
認証・認可の基本を学ぼう後編
kouyuume
0
180
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Site-Speed That Sticks
csswizardry
13
990
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
How GitHub (no longer) Works
holman
316
140k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.7k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Code Review Best Practice
trishagee
74
19k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Thoughts on Productivity
jonyablonski
73
5k
Designing Experiences People Love
moore
143
24k
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