ECatsBlog
  • Home
  • Web Dev
  • Reviews
  • Thoughts
  • ASP
  • SQL
  • Browser
  • Mobile
  • Cloud
  • CMS
  • ECommerce
  • App Hacks
  • Fixes
  • Mapping
  • 3D Printing
  • XAML
  • SEO

Categories

  • 3D Printing (1)
  • App Hacks (5)
  • ASP (22)
  • Browser (13)
  • Cloud (10)
  • CMS (7)
  • ECommerce (6)
  • Fixes (5)
  • Mapping (1)
  • Mobile (12)
  • Reviews (70)
  • SEO (9)
  • SQL (12)
  • Thoughts (60)
  • Uncategorized (1)
  • Web Dev (94)
  • XAML (9)

Archives

  • October 2024 (2)
  • December 2022 (1)
  • October 2022 (1)
  • February 2022 (1)
  • June 2019 (1)
  • January 2019 (175)
  • December 2018 (47)

Reactive Programming

When Written: April 2011

One item that did catch my attention was a presentation about the newly released Reactive Extensions of JavaScript. As is often the case when something like this comes along to an event like MIX  it is almost hidden beneath all the posturing about who can build the fastest browser. Reactive Extensions (RxJS ) could be the answer to many a web application builder’s dreams. So what do they do? Take the scenario that you have an application that needs to display an intermittent but often changing value. For example monitoring of a Twitter feed or perhaps displaying the latest football scores on a web page. The obvious way to do this is to set the web page to auto refresh every ten seconds or so.

The problem with this technique is that it can put quite a load on the web server if there are lots of visitors to the site, and the web server could very quickly run out of available connections. The value you are monitoring may not change for days or it might be changing every second, so every user polling a web server every ten seconds is a terrible waste of resources, and it would be much better if the getting of new data is event driven, the event being the change in value of this data. This is where Rx comes in; it is a library for event based, asynchronous communication to help in such scenarios. Whilst Rx has been around for a little while and ships in .NET 4, having a library for using RX with JavaScript is quite new and opens a whole range of possibilities.

To give it a try along with some examples visit http://msdn.microsoft.com/en-us/devlabs/ee794896 . I shall be trying some code out on a project that I am working on and I will report back on my efforts.

Article by: Mark Newton
Published in: Mark Newton

  • Previous Pre-Christmas Blues6 years ago
  • Next SPRY and SPRY again6 years ago

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • .net application moving files
  • Dealing with accents on database driven web site
  • Neat feature in Chrome
  • Unable to ping VM machine from host
  • SMTP Email Client

Recent Comments

    2025 ECatsBlog. Donna Theme powered by WordPress