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
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
970
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
rage against annotate_predecessor
junk0612
0
150
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
130
MLH State of the League: 2026 Season
theycallmeswift
0
210
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
オープンセミナー2025@広島LT技術ブログを続けるには
satoshi256kbyte
0
150
AIレビュアーをスケールさせるには / Scaling AI Reviewers
technuma
2
240
TDD 実践ミニトーク
contour_gara
1
270
コンテキストエンジニアリング Cursor編
kinopeee
1
740
ECS初心者の仲間 – TUIツール「e1s」の紹介
keidarcy
0
150
🔨 小さなビルドシステムを作る
momeemt
3
640
旅行プランAIエージェント開発の裏側
ippo012
1
600
機能追加とリーダー業務の類似性
rinchoku
0
280
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.5k
Scaling GitHub
holman
463
140k
Art, The Web, and Tiny UX
lynnandtonic
302
21k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
The Pragmatic Product Professional
lauravandoore
36
6.8k
Docker and Python
trallard
45
3.5k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
A better future with KSS
kneath
239
17k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Being A Developer After 40
akosma
90
590k
Site-Speed That Sticks
csswizardry
10
800
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