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
65
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
61
Introduction to Pair Programming
cbushell
1
120
An Introduction to BDD
cbushell
5
160
An Introduction to HTTP
cbushell
2
130
Agile Test Automation
cbushell
2
170
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
60
Other Decks in Programming
See All in Programming
EMこそClaude Codeでコード調査しよう
shibayu36
0
320
Claude CodeによるAI駆動開発の実践 〜そこから見えてきたこれからのプログラミング〜
iriikeita
0
320
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
140
pnpm に provenance のダウングレード を検出する PR を出してみた
ryo_manba
1
150
CSC509 Lecture 07
javiergs
PRO
0
240
品質ワークショップをやってみた
nealle
0
600
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
1
120
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
180
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.5k
CSC305 Lecture 10
javiergs
PRO
0
220
What's new in Spring Modulith?
olivergierke
1
160
Cursorハンズオン実践!
eltociear
2
1.2k
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
RailsConf 2023
tenderlove
30
1.3k
Designing for Performance
lara
610
69k
Being A Developer After 40
akosma
91
590k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Git: the NoSQL Database
bkeepers
PRO
431
66k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
GitHub's CSS Performance
jonrohan
1032
470k
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