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
75
Other Decks in Programming
See All in Programming
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
380
Vuetify 3 → 4 何が変わった?差分と移行ポイント10分まとめ
koukimiura
0
120
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
130
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
170
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
560
Ruby x Terminal
a_matsuda
7
590
Codex の「自走力」を高める
yorifuji
0
1.2k
CSC307 Lecture 13
javiergs
PRO
0
320
How to stabilize UI tests using XCTest
akkeylab
0
110
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
Windows on Ryzen and I
seosoft
0
250
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
190
Featured
See All Featured
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
130
The browser strikes back
jonoalderson
0
780
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
210
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
140
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Ruling the World: When Life Gets Gamed
codingconduct
0
170
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