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
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
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.3k
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
340
はじめてのPLATEAU
nokonoko1203
1
670
テストだけで見つかる? Rubyでつくるメソッド発掘器
izawa
0
160
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
150
How SRE Grew Out of Server-Side Work and Became the Team's Own / サーバサイドから始まったSREを チームに渡すまで
maaaato
1
270
読みやすい!と評判(?)の発表の準備にかける私のこだわり
shoheimitani
0
170
JavaScriptはシングルバイナリの夢を見るか / Does JavaScript Dream of a Single Binary?
ssssota
0
550
数行の変更でDockerビルドを最大91%高速化~GitLab CIの実行基盤を社内40リポジトリに展開するまで~
picopico
3
970
SODA - FACT BOOK(JP)
sodainc
1
40k
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
260
Featured
See All Featured
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
4
1.3k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
410
Making Projects Easy
brettharned
120
6.9k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3.1k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
490
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
490
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7.1k
Deep Space Network (abreviated)
tonyrice
0
430
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
550
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.3k