views:

201

answers:

2

I have been looking at the Rx Framework aslo refered to as LINQ to events. This is definately a great thing but I have been wondering if anyone sees this as having any uses in web applications rather than just normal windows based apps?

+2  A: 

You can use Rx in various call back scenarios, not just when you work 'normal windows apps'. Especially, when you work with Async operations - for ex, you might need to make a call to the server or cloud from your silverlight or desktop client and to receive the data back. Or in cases you'll get a call back from the server (in cases like Polling Duplex).

Also, another scenario for web apps - to invalidate your cache when you receive a data changed event from the model. Just some 'imaginary' code here if you've a cache and model designed accordingly...

var cacheListeners=from sender in myModel.GetDataChangedEvents()
                   select sender;

//Subscribe 

cacheListeners.Subscribe(data=>Cache.Invalidate(data.Key));

Have a look at this http://amazedsaint.blogspot.com/2009/11/systemreactive-or-net-reactive.html

amazedsaint
+1  A: 

It appears that the original spark for the Rx was around web based programming - in particular to simplify the challenges of AJAX style applications.

Here's a web based example

http://blogs.msdn.com/somasegar/archive/2009/11/18/reactive-extensions-for-net-rx.aspx

Scott Weinstein