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
65
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
61
Introduction to Pair Programming
cbushell
1
120
An Introduction to BDD
cbushell
5
160
An Introduction to HTTP
cbushell
2
130
Agile Test Automation
cbushell
2
170
Working Effectively With Legacy Code
cbushell
4
250
Jasmine, BDD for JavaScript
cbushell
1
120
Branches Are For Trees. How to Develop Software Without Them
cbushell
1
100
Continuous Integration, fast builds and Flot
cbushell
2
60
Other Decks in Programming
See All in Programming
Gemini CLIの"強み"を知る! Gemini CLIとClaude Codeを比較してみた!
kotahisafuru
3
980
QA x AIエコシステム段階構築作戦
osu
0
270
パスタの技術
yusukebe
1
360
Understanding Ruby Grammar Through Conflicts
yui_knk
1
100
Google I/O Extended Incheon 2025 ~ What's new in Android development tools
pluu
1
270
GitHub Copilotの全体像と活用のヒント AI駆動開発の最初の一歩
74th
7
2.6k
Scale out your Claude Code ~自社専用Agentで10xする開発プロセス~
yukukotani
9
2k
Go製CLIツールをnpmで配布するには
syumai
2
1.2k
대규모 트래픽을 처리하는 프론트 개발자의 전략
maryang
0
120
Terraform やるなら公式スタイルガイドを読もう 〜重要項目 10選〜
hiyanger
13
3.1k
バイブコーディングの正体——AIエージェントはソフトウェア開発を変えるか?
stakaya
5
880
それ CLI フレームワークがなくてもできるよ / Building CLI Tools Without Frameworks
orgachem
PRO
17
3.8k
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
Into the Great Unknown - MozCon
thekraken
40
2k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Thoughts on Productivity
jonyablonski
69
4.8k
Building Adaptive Systems
keathley
43
2.7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
Adopting Sorbet at Scale
ufuk
77
9.5k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
What's in a price? How to price your products and services
michaelherold
246
12k
Code Reviewing Like a Champion
maltzj
524
40k
The World Runs on Bad Software
bkeepers
PRO
70
11k
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