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
Composing Reactive Software
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
michaelavila
July 28, 2017
Programming
87
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
97
Other Decks in Programming
See All in Programming
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
110
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
390
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
170
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
150
Building an Out-of-Order CPU
latte72
1
780
Are APIs Still Relevant in the AI Era?
soyuka
0
230
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.4k
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
1.9k
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
110
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
160
Heart of Swift Concurrency
koher
0
830
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
530
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
240
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
How to Talk to Developers About Accessibility
jct
2
550
The Curious Case for Waylosing
cassininazir
1
510
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
HDC tutorial
michielstock
2
870
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
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!