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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Chris Bushell
July 07, 2010
Programming
93
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
Transcript
8 slides
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
More Decks by Chris Bushell
See All by Chris Bushell
Test Automation for Packaged Systems: Yes You Can!
cbushell
0
110
Introduction to Pair Programming
cbushell
1
160
An Introduction to BDD
cbushell
5
200
An Introduction to HTTP
cbushell
2
180
Agile Test Automation
cbushell
2
210
Working Effectively With Legacy Code
cbushell
4
280
Jasmine, BDD for JavaScript
cbushell
1
150
Branches Are For Trees. How to Develop Software Without Them
cbushell
1
140
Continuous Integration, fast builds and Flot
cbushell
2
100
Other Decks in Programming
See All in Programming
JavaScriptはシングルバイナリの夢を見るか / Does JavaScript Dream of a Single Binary?
ssssota
1
1.3k
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
870
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
270
Kiro Crewによる開発体験ーKiro CrewでStrands Decider 2B に関する技術検証をやってみた
satoshi256kbyte
1
240
特急いなほ as a Workflow / 20261107jaws-festa-2026-akita-lt
kasacchiful
PRO
0
110
R言語プログラミング
profjoesuzuki
0
150
Datadog を OTel にするメリットを考察する — Datadog との併用を実アプリで確かめる / Examining the Benefits of Moving Datadog to OTel — Testing OTel Alongside Datadog in a Real App
seike460
PRO
1
120
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
AI駆動TDD ― 2026年10月版
hrmstrsmgs
0
120
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
480
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
250
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
180
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
410
Faster Mobile Websites
deanohume
310
32k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
610
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
590
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
For a Future-Friendly Web
brad_frost
184
11k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
SEO for Brand Visibility & Recognition
aleyda
0
4.9k
Design in an AI World
tapps
1
400
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
400