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
MCP連携で加速するAI駆動開発/mcp integration accelerates ai-driven-development
bpstudy
0
290
Claude Code と OpenAI o3 で メタデータ情報を作る
laket
0
110
Gemini CLIの"強み"を知る! Gemini CLIとClaude Codeを比較してみた!
kotahisafuru
3
960
書き捨てではなく継続開発可能なコードをAIコーディングエージェントで書くために意識していること
shuyakinjo
1
250
Infer入門
riru
4
1.3k
AHC051解法紹介
eijirou
0
320
AIのメモリー
watany
13
1.4k
What's new in Adaptive Android development
fornewid
0
140
可変性を制する設計: 構造と振る舞いから考える概念モデリングとその実装
a_suenami
10
1.7k
プロダクトという一杯を作る - プロダクトチームが味の責任を持つまでの煮込み奮闘記
hiliteeternal
0
440
AIに安心して任せるためにTypeScriptで一意な型を作ろう
arfes0e2b3c
0
340
대규모 트래픽을 처리하는 프론트 개발자의 전략
maryang
0
120
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
140
7.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
How to Think Like a Performance Engineer
csswizardry
25
1.8k
Docker and Python
trallard
45
3.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Navigating Team Friction
lara
188
15k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
800
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Gamification - CAS2011
davidbonilla
81
5.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
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