Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
1
2.2k
Architecting Your Project with a Finite-State Machine
Patrick Seda
February 24, 2017
Tweet
Share
More Decks by Patrick Seda
See All by Patrick Seda
The API of Your Company Culture
pxtrick
3
980
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
700
Other Decks in Programming
See All in Programming
Graviton と Nitro と私
maroon1st
0
130
ゲームの物理 剛体編
fadis
0
370
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.5k
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
160
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
250
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
AIエージェントの設計で注意するべきポイント6選
har1101
5
2k
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
570
Developing static sites with Ruby
okuramasafumi
0
320
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
3
590
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
410
実はマルチモーダルだった。ブラウザの組み込みAI🧠でWebの未来を感じてみよう #jsfes #gemini
n0bisuke2
3
1.3k
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
27
Leadership Guide Workshop - DevTernity 2021
reverentgeek
0
160
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
26
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
190
Git: the NoSQL Database
bkeepers
PRO
432
66k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Faster Mobile Websites
deanohume
310
31k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
280
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
36
How STYLIGHT went responsive
nonsquared
100
6k
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