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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Chris Bushell
July 07, 2010
Programming
76
1
Share
State Pattern From GoF
Prepared for the Melbourne Patterns Group
Chris Bushell
July 07, 2010
More Decks by Chris Bushell
See All by Chris Bushell
Test Automation for Packaged Systems: Yes You Can!
cbushell
0
80
Introduction to Pair Programming
cbushell
1
140
An Introduction to BDD
cbushell
5
180
An Introduction to HTTP
cbushell
2
140
Agile Test Automation
cbushell
2
190
Working Effectively With Legacy Code
cbushell
4
260
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
83
Other Decks in Programming
See All in Programming
デフォルト運用のCodeRabbit、1年で何が変わったか / How CodeRabbit Changed Our Code Review in 1 Year
bake0937
1
110
GitHub Copilot CLIのいいところ
htkym
2
1.2k
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
1.7k
~ 秘伝のタレ化した『神スプシ』と戦う ~ 関数型パラダイムで壊れない仕組みへ
h0r15h0
1
140
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
130
Swiftのレキシカルスコープ管理
kntkymt
0
200
AIエージェントの隔離技術の徹底比較
kawayu
0
440
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
15
7.3k
OSもどきOS
arkw
0
280
iOS26時代の新規アプリ開発
yuukiw00w
0
210
3Dシーンの圧縮
fadis
1
470
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
410
Featured
See All Featured
It's Worth the Effort
3n
188
29k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
370
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
290
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
250
The Curious Case for Waylosing
cassininazir
1
360
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
350
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
190
Technical Leadership for Architectural Decision Making
baasie
3
380
A Soul's Torment
seathinner
6
2.9k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
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