… the next moment when someone comes to you with surprisingly interesting idea. And that happened to me few days ago, when two guys from client side approached me to ask for my opinion about library they’ve found in Microsoft Dev Labs. That’s how I started my adventure with Reactive Extensions (Rx).
Rx is a .NET library that offers you very amusing approach to asynchronous programming by different than usual handling of events - basically, due to extensive usage of Observer/Observable design pattern you’re able to treat event streams as filterable and query-able dynamic collections. So you can declaratively set what you’d like to do with events and in what conditions.
For example: you can collect all capital letters from console input, but in chunks (for example, 3 sec of input long ones) and send those chunks in asynchronous calls to server (long live Intellisense!). And on the top of that, you can mock event streams (for unit test purpose) in the most simple way I’ve ever seen.
As I’m recently quite interested in Complex Event Processing, it really delighted my appetite. Not only because it’s quite an interesting idea and the way Microsoft did it is quite convenient for everyday development (they utilized LINQ-To-Objects) - I found the idea very refreshing, because it let me think about asynchronous user interface design in a different way then I did earlier. I really love solutions of that kind - someone just tells you basics and your head is already full of ideas of utilizing this.
Here are some links you can check if you’re interested:
http://msdn.microsoft.com/en-us/data/gg577609
http://rxwiki.wikidot.com/101samples