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
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
330
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
240
nilとは何か 〜interfaceの構造とnil!=nilから理解する〜
kuro_kurorrr
3
1.9k
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
560
TipKitTips
ktcryomm
0
160
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
120
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
260
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1k
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.8k
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3.3k
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
220
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
420
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
84
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
120
Skip the Path - Find Your Career Trail
mkilby
1
76
The Cult of Friendly URLs
andyhume
79
6.8k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
170
What does AI have to do with Human Rights?
axbom
PRO
1
2k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
A Modern Web Designer's Workflow
chriscoyier
698
190k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
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