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
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
0
120
Debugging: All you need to know (for simultaneous interpreting)
jmatsu
2
800
LangGraphでのHuman-in-the-Loopの実装
os1ma
3
1.1k
いまから追い上げる、Jetpack Compose トレーニング
nyafunta9858
0
590
Desafios e Lições Aprendidas na Migração de Monólitos para Microsserviços em Java
jessilyneh
2
150
watsonx.ai Dojo #2 生成AIを使ったアプリ開発入門編
oniak3ibm
PRO
0
180
Rubyとクリエイティブコーディングの輪の広がり / The Growing Circle of Ruby and Creative Coding
chobishiba
1
270
Scala アプリケーションのビルドを改善してデプロイ時間を 1/4 にした話 | How I improved the build of my Scala application and reduced deployment time by 4x
nomadblacky
1
180
ECMAScript、Web標準の型はどう管理されているか / How ECMAScript and Web standards types are maintained
petamoriken
3
390
Rubyのobject_id
qnighy
6
1.3k
Developer Joy == Developer Productivity (really!)
hollycummins
1
220
意外とフォントが大事だった話 / Font Issues on Internationalization
fumi23
0
110
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
71
5.3k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
27
7.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
36
1.7k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
103
48k
Fontdeck: Realign not Redesign
paulrobertlloyd
80
5.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
123
18k
WebSockets: Embracing the real-time Web
robhawkes
59
7.3k
4 Signs Your Business is Dying
shpigford
179
21k
Testing 201, or: Great Expectations
jmmastey
36
7k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Making Projects Easy
brettharned
113
5.8k
Faster Mobile Websites
deanohume
304
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