Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
State Pattern From GoF
Search
Chris Bushell
July 07, 2010
Programming
86
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
96
Introduction to Pair Programming
cbushell
1
150
An Introduction to BDD
cbushell
5
190
An Introduction to HTTP
cbushell
2
160
Agile Test Automation
cbushell
2
210
Working Effectively With Legacy Code
cbushell
4
270
Jasmine, BDD for JavaScript
cbushell
1
140
Branches Are For Trees. How to Develop Software Without Them
cbushell
1
130
Continuous Integration, fast builds and Flot
cbushell
2
91
Other Decks in Programming
See All in Programming
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.9k
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
350
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
450
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
940
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
360
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8k
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
200
JRuby: Past, Present, and Future
headius
0
220
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
210
パーソナライズPodcastを作った話
repunit11
0
130
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
1
590
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
700
Side Projects
sachag
456
43k
New Earth Scene 8
popppiees
4
2.7k
How to build a perfect <img>
jonoalderson
1
6.1k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
450
Making the Leap to Tech Lead
cromwellryan
135
10k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
450
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
550
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
720
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