Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Architecting Your Project with a Finite-State M...
Search
Patrick Seda
February 24, 2017
Programming
2.3k
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
Transcript
30 slides
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
More Decks by Patrick Seda
See All by Patrick Seda
The API of Your Company Culture
pxtrick
3
1k
Lightning Talk - Enhancing Vue and Vuex for Complex Application State
pxtrick
1
1.2k
Swift - Beyond Beginner
pxtrick
0
1.4k
Crossing the Chasm of Swift
pxtrick
0
1.4k
Your Code is Terrible (I Love It!)
pxtrick
0
1.3k
An Introduction to Location-Based Technologies (for Business & Marketing)
pxtrick
0
610
The Passion of Lazy - Enterprise Mobile App Design Patterns
pxtrick
0
2.3k
10 Tips for Kickass Enterprise Mobile Apps
pxtrick
0
1.1k
Making Mobile Games (A presentation for the Girl Scouts)
pxtrick
1
720
Other Decks in Programming
See All in Programming
Crash Auto Pipelines
veronikapj
1
450
AI Augmentation Techniques with Liberty
ivargrimstad
1
560
特急いなほ as a Workflow / 20261107jaws-festa-2026-akita-lt
kasacchiful
PRO
0
110
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
430
The Cost of the DOM
ypresto
2
170
読みやすい!と評判(?)の発表の準備にかける私のこだわり
shoheimitani
0
160
Debian JP Projectのサーバー構成
uwabami
1
170
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
190
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
120
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
210
Distance field of Julia set
kinakomoti321
0
330
How SRE Grew Out of Server-Side Work and Became the Team's Own / サーバサイドから始まったSREを チームに渡すまで
maaaato
0
190
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
3k
Designing Experiences People Love
moore
143
24k
New Earth Scene 8
popppiees
5
2.9k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
490
Tell your own story through comics
letsgokoyo
1
1.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
The SEO Collaboration Effect
kristinabergwall1
1
630
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
390
The SEO identity crisis: Don't let AI make you average
varn
0
630
Scaling GitHub
holman
464
140k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.6k