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
Chris Bushell
July 07, 2010
Programming
86
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
97
Introduction to Pair Programming
cbushell
1
150
An Introduction to BDD
cbushell
5
200
An Introduction to HTTP
cbushell
2
170
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
92
Other Decks in Programming
See All in Programming
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
320
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
120
Groovy as a human and AI friendly programming language
paulk
0
140
Event is what happens
moro
2
2.3k
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
180
No More NoSuchMethodError
exoego
1
120
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
210
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.2k
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
140
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
190
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
210
Modernizing iOS Apps
seyfoyun
0
140
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
4k
Marketing to machines
jonoalderson
1
5.9k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Speed Design
sergeychernyshev
33
2.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Into the Great Unknown - MozCon
thekraken
41
2.8k
A Tale of Four Properties
chriscoyier
163
24k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Exploring anti-patterns in Rails
aemeredith
4
550
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