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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
97
Introduction to Pair Programming
cbushell
1
150
An Introduction to BDD
cbushell
5
200
An Introduction to HTTP
cbushell
2
170
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
92
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
510
golang-bob.pdf
iwatsukayura
0
150
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
190
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
120
LLM 101
dalinaum
0
380
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
12
7.8k
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
390
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.3k
SODA - FACT BOOK(EN)
sodainc
1
190
ActionController meets Protocol Buffers
sorah
1
750
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
190
[2026-10-09]一枚の布で作らなくてもいい。 信頼性は「パッチワーク」で紡がれる~既存の運用と新しい可能性をつなぎ合わせてきたCREの話~
tosite
0
120
Featured
See All Featured
Site-Speed That Sticks
csswizardry
13
1.6k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.8k
Being A Developer After 40
akosma
PRO
92
590k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
590
Between Models and Reality
mayunak
4
530
Chasing Engaging Ingredients in Design
codingconduct
0
380
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Mind Mapping
helmedeiros
1
420
Fireside Chat
paigeccino
43
4.1k
Thoughts on Productivity
jonyablonski
76
5.4k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
560
The Mindset for Success: Future Career Progression
greggifford
PRO
0
550
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