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
Functional Reactive Programming
Search
Jason Orendorff
March 30, 2013
Programming
9
990
Functional Reactive Programming
Slides for a talk by Wilkes Joiner at Nashville Code Co-op Talk Day.
Jason Orendorff
March 30, 2013
Tweet
Share
More Decks by Jason Orendorff
See All by Jason Orendorff
Aristotle's Topics
jorendorff
0
150
Meltdown & Spectre
jorendorff
0
110
<textarea distributed>: An illustrated intro to CRDTs
jorendorff
0
88
Cabbages, Goat, and Wolf In Two Styles!!
jorendorff
0
80
John Wark — Design Principles for a High School Coding Curriculum
jorendorff
1
130
Teaching Programming
jorendorff
2
150
goto fail; — Challenges and Considerations for Teaching Programming to Kids
jorendorff
1
90
How To Fix Bugs
jorendorff
0
120
Compilers 101: An introduction to programming languages and parsing
jorendorff
3
810
Other Decks in Programming
See All in Programming
Architectural Extensions
denyspoltorak
0
270
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
Implementation Patterns
denyspoltorak
0
280
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
12
6.4k
CSC307 Lecture 02
javiergs
PRO
1
770
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.8k
Fragmented Architectures
denyspoltorak
0
140
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
190
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
530
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
170
Navigating Team Friction
lara
192
16k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Done Done
chrislema
186
16k
The untapped power of vector embeddings
frankvandijk
1
1.6k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
400
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
Joys of Absence: A Defence of Solitary Play
codingconduct
1
280
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
240
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
130
Transcript
Functional Reactive Programming
“Everything flows, nothing stands still.” Heraclitus
Streams of Events
Streams of Events • Fire and forget events are relatively
easy to create.
Streams of Events • Fire and forget events are relatively
easy to create. • UIs
Streams of Events • Fire and forget events are relatively
easy to create. • UIs • Ajax posts
Streams of Events • Fire and forget events are relatively
easy to create. • UIs • Ajax posts • Messaging queues
Processing Events
Processing Events • A little trickier
Processing Events • A little trickier • difficult to compose
Processing Events • A little trickier • difficult to compose
• lots of plumbing
Processing Events • A little trickier • difficult to compose
• lots of plumbing • Callback Hell
“We’re going to need a bigger boat.”
FRP • A model for values that vary over time
• Originates from Haskell Community • Several different implementation styles • We are focusing on Microsoft’s ReactiveExtenions style
Observable
Observable • A marriage of Iterables and the Observer Pattern
Observable • A marriage of Iterables and the Observer Pattern
• Typical Sequence functions - Map, Filter, Reduce, Take
Observable • A marriage of Iterables and the Observer Pattern
• Typical Sequence functions - Map, Filter, Reduce, Take • Subscribe/OnNext
Observable • A marriage of Iterables and the Observer Pattern
• Typical Sequence functions - Map, Filter, Reduce, Take • Subscribe/OnNext • Error Handling
Observable • A marriage of Iterables and the Observer Pattern
• Typical Sequence functions - Map, Filter, Reduce, Take • Subscribe/OnNext • Error Handling • Timing function - Delay
Observable • A marriage of Iterables and the Observer Pattern
• Typical Sequence functions - Map, Filter, Reduce, Take • Subscribe/OnNext • Error Handling • Timing function - Delay • Buffering - Last N events
Observable • A marriage of Iterables and the Observer Pattern
• Typical Sequence functions - Map, Filter, Reduce, Take • Subscribe/OnNext • Error Handling • Timing function - Delay • Buffering - Last N events • Composable - SelectMany/FlatMap
Marble Diagrams
A Marble Diagrams
A Marble Diagrams
A B Marble Diagrams
A B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
Autocomplete • On Keyup • Get the value of the
field • Only values of length 3 or more • Make remote call • Filter out bad response • Display results
Autocomplete in reality • On Keyup • Get the value
of the field • Throttle to 500ms • Only values of length 3 or more • Skip duplicates • Make remote call • Filter out bad response • Display results
Demo Source code: https://github.com/Cicayda/yolk-examples