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
Architecting Your Project with a Finite-State M...
Search
Patrick Seda
February 24, 2017
Programming
2.2k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Architecting Your Project with a Finite-State Machine
Patrick Seda
February 24, 2017
More Decks by Patrick Seda
See All by Patrick Seda
The API of Your Company Culture
pxtrick
3
990
Lightning Talk - Enhancing Vue and Vuex for Complex Application State
pxtrick
1
1.2k
Swift - Beyond Beginner
pxtrick
0
1.3k
Crossing the Chasm of Swift
pxtrick
0
1.4k
Your Code is Terrible (I Love It!)
pxtrick
0
1.2k
An Introduction to Location-Based Technologies (for Business & Marketing)
pxtrick
0
600
The Passion of Lazy - Enterprise Mobile App Design Patterns
pxtrick
0
2.2k
10 Tips for Kickass Enterprise Mobile Apps
pxtrick
0
1k
Making Mobile Games (A presentation for the Girl Scouts)
pxtrick
1
710
Other Decks in Programming
See All in Programming
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
110
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
170
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
130
ローカルLLMでどこまでコードが書けるか -縮小版 / How much code can be written on a local LLM Shortened
kishida
2
190
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
140
Claude Team Plan導入・ガイド
tk3fftk
0
210
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
360
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
500
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
560
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.6k
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
500
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
9.2k
Featured
See All Featured
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.7k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
410
Docker and Python
trallard
47
4k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
450
My Coaching Mixtape
mlcsv
0
170
Building the Perfect Custom Keyboard
takai
2
820
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Odyssey Design
rkendrick25
PRO
2
730
The Language of Interfaces
destraynor
162
27k
Transcript
Architecting Your Project with a Finite-State Machine DEVNEXUS Atlanta –
February 24, 2017
Patrick Seda @pxtrick - CTO of Colligo Vox - Mobile/Technology
Solutions Consulting - 25+ Years as a Software Professional - Apps: Enterprise to Children’s games
None
None
Track State ? How Do We
Booleans, Constants, Strings
None
Finite-State Machine!
- Abstract machine - Can be in exactly one of
a finite number of states at a time - State changes via input events - Transitions - Module finite-state machine
finite-state machine Door Closed Door Open open close
Configuring The FSM
configuring // JSON example ... var config = { states:
{ ‘DoorClosed’: { events: { ‘open’: { toState: ‘DoorOpen’} } }, ‘DoorOpen’: { events: { ‘close’: { toState: ‘DoorClosed’} } } }, startState: ‘DoorClosed’ };
Home Security System! Let’s Design a
a security system
A Honeywell Security System
Armed Stay Armed Away Armed Max Exit Delay? Entry Delay?
Motion? No Yes Yes Yes Yes No No Yes Yes Armed Instant No No No a honeywell system
“Armed Away” a honeywell system
“Armed Max” a honeywell system
“Armed Stay” a honeywell system
“Armed Instant” a honeywell system
a honeywell system
The State Pattern
state pattern • Separates interface from implementation • Enables interchangeable
behavior • Perfect for a state machine! Context State State A State B handle() handle() handle()
state pattern Handler State Armed Disarmed handle() handle() handle() Alarming
handle() for our home security system …
The System In Motion
Architectural Big Picture
big picture Event Handler Disarmed State State State Armed FSM
big picture Visual Status Audible Status Emergency Services Web Backend
Keypad Sensors
None
[email protected]
linkedin.com/in/patrickseda speakerdeck.com/pxtrick podcast: techmatters.fm Patrick Seda @pxtrick