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
69
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
64
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
120
Continuous Integration, fast builds and Flot
cbushell
2
76
Other Decks in Programming
See All in Programming
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
710
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
450
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
260
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
410
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
150
ロボットのための工場に灯りは要らない
watany
11
3k
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
150
CS教育のDX AIによる育成の効率化
niftycorp
PRO
0
150
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
230
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
630
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
141
7.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
How to train your dragon (web standard)
notwaldorf
97
6.6k
It's Worth the Effort
3n
188
29k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
86
RailsConf 2023
tenderlove
30
1.4k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
150
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Chasing Engaging Ingredients in Design
codingconduct
0
150
The World Runs on Bad Software
bkeepers
PRO
72
12k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
260
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
160
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