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
78
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
84
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
130
Continuous Integration, fast builds and Flot
cbushell
2
84
Other Decks in Programming
See All in Programming
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
360
AIエージェントで 変わるAndroid開発環境
takahirom
2
680
【やさしく解説 設計編 #1】「ドメイン駆動」と「実装駆動」ってなに? 〜設計の考え方を、たとえ話で学ぼう〜
panda728
PRO
1
120
act2-costs.pdf
sumedhbala
0
110
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
140
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
180
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
2
550
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.5k
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
360
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
320
광주소프트웨어마이스터고등학교 DevFest 특강 - 바이브 코딩 시대에서 주니어 개발자로 살아남는 방법
utilforever
1
140
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
130
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
37
7.4k
The untapped power of vector embeddings
frankvandijk
2
1.8k
New Earth Scene 8
popppiees
3
2.4k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
810
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Product Roadmaps are Hard
iamctodd
55
12k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
590
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
230
Faster Mobile Websites
deanohume
310
32k
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