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
700
3
Share
Introduction to Reactive Extensions
This is a talk I first gave at Nebraska Code Camp on March 10th, 2012
Ana Betts
March 10, 2012
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
感情を設計する
ichimichi
5
1.2k
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
5
2.5k
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
160
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.3k
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
230
AI活用のコスパを最大化する方法
ochtum
0
370
PDI: Como Alavancar Sua Carreira e Seu Negócio
marcelgsantos
0
100
Nuxt Server Components
wattanx
0
250
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
540
Smarter Angular mit Transformers.js & Prompt API
christianliebel
PRO
1
120
Java 21/25 Virtual Threads 소개
debop
0
330
Rethinking API Platform Filters
vinceamstoutz
0
9.9k
Featured
See All Featured
The Curious Case for Waylosing
cassininazir
0
290
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.5k
Building the Perfect Custom Keyboard
takai
2
720
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
340
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
250
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
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