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
1.1k
Making Mobile Games (A presentation for the Girl Scouts)
pxtrick
1
710
Other Decks in Programming
See All in Programming
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.5k
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
460
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
500
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
120
今さら聞けない .NET CLI
htkym
0
190
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
170
VibeCodingからAgenticWorkflowへ
starfish719
0
370
the container ship “Apple Silicon”@WWDC26 Recap -Japan-\(region).swift
shingangan
0
120
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
640
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
490
Foundation Models frameworkで画像分析
ryodeveloper
1
600
Cloudflare is Agents
chimame
0
150
Featured
See All Featured
Design in an AI World
tapps
1
280
Typedesign – Prime Four
hannesfritz
42
3.1k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
360
Six Lessons from altMBA
skipperchong
29
4.4k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
470
Being A Developer After 40
akosma
91
590k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
How to make the Groovebox
asonas
2
2.3k
Color Theory Basics | Prateek | Gurzu
gurzu
0
410
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
119
120k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
What's in a price? How to price your products and services
michaelherold
247
13k
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