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
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
Embedded SREと共に達成した会員管理システムのAWS移行 - SRE NEXT 2026 ランチスポンサーセッション
niftycorp
PRO
1
2.7k
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
180
Claude Team Plan導入・ガイド
tk3fftk
0
210
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
330
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
130
霧の中の代数的エフェクト
funnyycat
1
400
共通化で考えるべきは、実装より公開する型だった
codeegg
0
250
『コードを書く以外の』エンジニアリング〜課金基盤移行プロジェクト推進のためのTips4選
yuriko1211
0
510
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
190
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
0
210
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
9.1k
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
190
Featured
See All Featured
The Curse of the Amulet
leimatthew05
2
13k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
210
Writing Fast Ruby
sferik
630
63k
Odyssey Design
rkendrick25
PRO
2
730
Test your architecture with Archunit
thirion
1
2.3k
[SF Ruby Conf 2025] Rails X
palkan
2
1.2k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
Java REST API Framework Comparison - PWX 2021
mraible
34
9.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
220
Un-Boring Meetings
codingconduct
0
350
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
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