Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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

See the project http://reactivetrader.com/ to see Rx in use in a web application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top