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
74
Other Decks in Programming
See All in Programming
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
260
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
高速開発のためのコード整理術
sutetotanuki
1
390
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
680
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
200
Architectural Extensions
denyspoltorak
0
280
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
CSC307 Lecture 08
javiergs
PRO
0
670
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.3k
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
100
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
230
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Docker and Python
trallard
47
3.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Site-Speed That Sticks
csswizardry
13
1.1k
sira's awesome portfolio website redesign presentation
elsirapls
0
150
Designing for Timeless Needs
cassininazir
0
130
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