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
690
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
140
Electron Pro-Tips
anaisbetts
0
200
Electron: The Boring Parts
anaisbetts
1
400
Why Akavache is Fast: How not to use sqlite3
anaisbetts
0
190
Native Modules in Electron
anaisbetts
3
8.4k
Single Page Apps in Electron
anaisbetts
3
1.5k
Functional Reactive Programming in Practice
anaisbetts
2
330
Awaiting for Rx
anaisbetts
4
580
On Programming
anaisbetts
3
360
Other Decks in Programming
See All in Programming
知っているようで知らない"rails new"の世界 / The World of "rails new" You Think You Know but Don't
luccafort
PRO
1
170
私の後悔をAWS DMSで解決した話
hiramax
4
210
AI時代のUIはどこへ行く?
yusukebe
18
9k
1から理解するWeb Push
dora1998
7
1.9k
アルテニア コンサル/ITエンジニア向け 採用ピッチ資料
altenir
0
110
MCPでVibe Working。そして、結局はContext Eng(略)/ Working with Vibe on MCP And Context Eng
rkaga
5
2.3k
アセットのコンパイルについて
ojun9
0
130
請來的 AI Agent 同事們在寫程式時,怎麼用 pytest 去除各種幻想與盲點
keitheis
0
120
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.9k
AIと私たちの学習の変化を考える - Claude Codeの学習モードを例に
azukiazusa1
10
4.3k
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
700
Putting The Genie in the Bottle - A Crash Course on running LLMs on Android
iurysza
0
140
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
70
11k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
850
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
53k
Music & Morning Musume
bryan
46
6.8k
For a Future-Friendly Web
brad_frost
180
9.9k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Optimizing for Happiness
mojombo
379
70k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
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