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
Introduction to Reactive Extensions
Search
Ana Betts
March 10, 2012
Programming
3
680
Introduction to Reactive Extensions
This is a talk I first gave at Nebraska Code Camp on March 10th, 2012
Ana Betts
March 10, 2012
Tweet
Share
More Decks by Ana Betts
See All by Ana Betts
Flutter in Practice
anaisbetts
2
130
Electron Pro-Tips
anaisbetts
0
190
Electron: The Boring Parts
anaisbetts
1
390
Why Akavache is Fast: How not to use sqlite3
anaisbetts
0
180
Native Modules in Electron
anaisbetts
3
8.4k
Single Page Apps in Electron
anaisbetts
3
1.5k
Functional Reactive Programming in Practice
anaisbetts
2
320
Awaiting for Rx
anaisbetts
4
580
On Programming
anaisbetts
3
350
Other Decks in Programming
See All in Programming
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
120
Ruby on cygwin 2025-02
fd0
0
150
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
250
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
pylint custom ruleで始めるレビュー自動化
shogoujiie
0
120
時計仕掛けのCompose
mkeeda
1
300
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
210
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
210
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
270
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
130
Lottieアニメーションをカスタマイズしてみた
tahia910
0
130
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
51
7.4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
9
450
Git: the NoSQL Database
bkeepers
PRO
427
64k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Unsuck your backbone
ammeep
669
57k
Facilitating Awesome Meetings
lara
52
6.2k
Statistics for Hackers
jakevdp
797
220k
Producing Creativity
orderedlist
PRO
344
39k
Done Done
chrislema
182
16k
Transcript
demo
REACTIVE EXTENSIONS
github @xpaulbettsx
We can no longer write synchronous software. - Abraham Lincoln
let’s talk linq.
the core of linq is the sequence.
pipelines new[] { 1, 2, 3, 4, 5 } .Select(x
=> x * 5) .Where(x => x % 2 == 0) .ForEach(Console.WriteLine)
a sequence is just some stuff, in a particular order
linq lets us describe what to do with data when
we get it... ...without actually having the data
what i’ve described is a monad.
I thought this was an Rx talk!
let’s talk events.
Events Aren’t Com pos able
OnMouseUp + OnMouseDown != OnDoubleClick
what is an event? OnKeyUp += (o,e) => DisplayASlide();
H
e
l
l
o
(!)
an event is just some stuff, in a particular order
Observables OnNext OnCompleted OnError ‘h’, ‘i’ no more stuff exception!
IObservable<T> IDisposable Subscribe(IObserver<T> observer); observable.Subscribe( x => WriteLine(x), () =>
WriteLine(“Done!”), ex => WriteLine(“Aieeeee!”));
IObservable is a list too
subscribe is your foreach
Cold <> Hot
Subject<T>
demo
Rx thinks about time
IObservable represents one of two things a stream of items
a future result
Rx Async Methods are methods that return IObservable<T>
IObservable<string> ReturnHelloWorld() { return Observable.Return(“Hello World”); } IObservable<string> ReturnHelloWorld() {
return Observable.Start(() => { return “Hello World”; }, Scheduler.TaskPoolScheduler); }
demo
learn more Rx Workshop Videos amzn.to/programming-rx