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
Composing Reactive Software
Search
michaelavila
July 28, 2017
Programming
83
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Composing Reactive Software
michaelavila
July 28, 2017
More Decks by michaelavila
See All by michaelavila
Navigating in VIM
michaelavila
0
91
Other Decks in Programming
See All in Programming
ふつうのFeature Flag実践入門
irof
7
3.8k
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
120
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
7
4.3k
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
340
Creating Composable Callables in Contemporary C++
rollbear
0
120
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
570
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
190
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
540
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
210
A2UI という光を覗いてみる
satohjohn
1
130
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
2
670
CSC307 Lecture 17
javiergs
PRO
0
320
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
41
2.6k
Rails Girls Zürich Keynote
gr2m
96
14k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
Exploring anti-patterns in Rails
aemeredith
3
410
Odyssey Design
rkendrick25
PRO
2
700
Being A Developer After 40
akosma
91
590k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.4k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
140
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
So, you think you're a good person
axbom
PRO
2
2.1k
Transcript
carbonfive.com Composing Reactive Software Michael Avila •
[email protected]
Agenda • Insufficient overview • Important, but poorly explained idea
• Vague and unjustified conclusion • Questions
Agenda (revised) • Reactive Programming • Signal Graph • Conclusion
• Questions
Reactive Programming
“... programming with asynchronous data streams ...”
interface Observable<T> { subscribe( onNext: (T) => void, onError: (Error)
=> void, onCompleted: () => void, ): Subscription; map( (T) => V): Observable<V>; flatMap((T) => Observable<V>): Observable<V>; scan( (V, T) => V, V): Observable<V>; filter( (T) => boolean): Observable<T>; withLatestFrom(Observable<V>, ...): Observable<[T, V, ...]>; combineLatest( Observable<V>, ...): Observable<[T, V, ...]>; … any many more! }
Operators buffer bufferCount bufferTime bufferToggle bufferWhen combineAll combineLatest concat concatAll
concatMap concatMapTo count debounce debounceTime defaultIfEmpty delay delayWhen dematerialize distinctUntilChanged do every expand filter first groupBy ignoreElements last let map mapTo merge mergeMap partition pluck publish race repeat retry retryWhen sample scan share single skip skipUntil skipWhile startWith switchMap window windowCount windowTime windowToggle windowWhen withLatestFrom zip … and probably more
const email$ = Observable.fromEvent(...<input/>...); const password$ = Observable.fromEvent(...<input/>...); const login$
= Observable.fromEvent(...<button/>...); const activeUser = login$ .withLatestFrom(email$, password$) .flatMap(([_, email, password]) => { return Observable.ajax.post('/auth/', { email, password }) .map(({ response }) => response); }); activeUser.subscribe(...<div>...);
None
None
None
Signal Graph
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
Additional Notes ➔ Asynchronous ➔ Lazy* ➔ Composable
None
Good?
None
¯\_(ツ)_/¯
Good! I think.
carbonfive.com Thanks!