Problem
Is there a suitable introduction and tutorial to the Microsoft Reactive (Rx) framework, aside from the Microsoft documentation?
Also, what is a good example (with code) of a programming problem that is difficult to handle with traditional asynchronous coding techniques that is made easier by Reactive?
Asked by LBushkin
Solution #1
UPDATE: The blog posts below have been superseded by my online book www.IntroToRx.com. It is a comprehensive 19 chapter book available for free. You can browse it on the web, or download the mobi version for your kindle. You can also get it direct from Amazon for a tiny fee (~99c / 77p). If the book doesn’t meet your needs or expectations, let me (the Author) know and we will do better for v2.
Thank you for including a link to the Hot/Cold post in your comment. This is merely a portion of the entire series.
More Rx introductory material will be added to this blog in the future.
You should go to the Rx Forum for more advanced information (MSDN).
Answered by Lee Campbell
Solution #2
Here’s a wiki page with dozens of code examples explaining how to use the.NET Rx framework’s various features: http://rxwiki.wikidot.com/101samples
This is the most extensive site I’ve seen, and it’s also the easiest to begin started with.
Answered by LBushkin
Solution #3
Rx-Framework Rx-Framework Rx-Framework Rx-Framework R
The Source Code is useful for a developer who wants to dig deeper.
Rx keynote by a cool Austrian
This is the finest example I’ve seen so far: Rx: Curing your asynchronous programming blues – DevCamp 2010 Keynote
Channel 9 has some fascinating videos.
Inside.NET Rx with IObservable/IObserver in the BCL, by Kim Hamilton and Wes Dyer (VS 2010)
Expert to Expert: Brian Beckman and Erik Meijer – Inside the.NET Reactive Framework is an interview with the creators of Rx: Expert to Expert: Brian Beckman and Erik Meijer – Inside the.NET Reactive Framework (Rx)
Rx’s author gives a brief introduction.
An Codeproject Article
Another blog containing links for the first course (new)
Answered by Summer-Time
Solution #4
It draws lines when the mouse button is pressed, which is simple to perform using reactive programming but difficult (if not impossible) with traditional events. It’s understandable, and there’s no explicit state management:
var pen = new Pen(Color.Red, 3);
var graphics = this.CreateGraphics();
var mouseMoveWhileDown =
from md in this.GetMouseDown()
from mv in this.GetMouseMove().Until(this.GetMouseUp())
select new Point(mv.X, mv.Y);
mouseMoveWhileDown
.Pairwise()
.Subscribe(tup => graphics.DrawLine(pen, tup.Item1, tup.Item2));
(I must admit, Pairwise() is a home-grown function in that example…)
The most significant feature of IObservable is that it, like IEnumerable, is ‘composable.’
I strongly suggest watching the video given in another answer. In reality, Channel9 has a number of videos on the issue, including:
Answered by Benjol
Solution #5
After you’ve gone over some of the basics, such as the HandsOnLab, be sure to check out Lee Campbell’s Hot and Cold Observables, which helped me decipher some of the esoteric mysteries of Rx:)
Answered by sweetlilmre
Post is based on https://stackoverflow.com/questions/1596158/good-introduction-to-the-net-reactive-framework