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
700
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
150
Electron Pro-Tips
anaisbetts
0
210
Electron: The Boring Parts
anaisbetts
1
410
Why Akavache is Fast: How not to use sqlite3
anaisbetts
0
200
Native Modules in Electron
anaisbetts
3
8.4k
Single Page Apps in Electron
anaisbetts
3
1.5k
Functional Reactive Programming in Practice
anaisbetts
2
340
Awaiting for Rx
anaisbetts
4
590
On Programming
anaisbetts
3
380
Other Decks in Programming
See All in Programming
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
890
存在論的プログラミング: 時間と存在を記述する
koriym
3
340
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
320
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
120
AI活用のコスパを最大化する方法
ochtum
0
270
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
900
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
230
Windows on Ryzen and I
seosoft
0
350
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
390
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
500
へんな働き方
yusukebe
5
2.8k
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
180
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
150
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
650
The Spectacular Lies of Maps
axbom
PRO
1
640
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
76
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Producing Creativity
orderedlist
PRO
348
40k
Bash Introduction
62gerente
615
210k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.4k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
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