Sunday, January 10, 2010

DNUG Reactive Framework Presentation

On December 17th (2009) I gave a talk to my local .NET user group about the Microsoft Reactive Extensions for .NET
Here's a brief outline of what I talked about:
Note: I had a recurring theme throughout the presentation that shorter code is better. I had random slides thrown in with quotes from programming "celebrities" to keep trying to push the point. I did this because I personally believe in it, and also because being able to do more with less code is one of the big benefits of the Reactive Framework.
As I've met more than a few developers who are still running .NET 2.0 on VS2005, I started by giving a brief recap on the C# 3.0 language features that Rx makes heavy use of (lambdas, linq, and so forth)
I then did a quick overview defining exactly what Asynchronous programming is, and why you'd want to do it (Rx is all about asynchronous programming after all)
With the overviews out of the way, I talked a bit about the IObservable interface and how it related to IEnumerable, and showed a few short code snippets of code using Rx (looking surprisingly the same as ordinary Linq), and some diagrams showing the timeline of things that happen when using both IEnumerable and IObservable
I then cut to a demo. Sample code shown in the demo is available as on Google Code and I'm placing it under the creative commons by attribution license. You don't have to provide attribution (it's a code sample!), but I can't find a CC license other than public domain that doesn't require attribution.
Most of the demo focused on the WcfClient and WcfServer projects - they're the most interesting, so I'd suggest looking at those if you're interested.
I followed up with a few more slides containing other tidbits (such as the fact that you get a backport of the .NET 4 parallel task library for free with Rx), and some links.