Functional Reactive Programming with RxJS
Submitted by Vasanth Gopal (@vasanthg) on Saturday, 9 August 2014
Web Applications have changed over the year from simple HTML pages to DHTML to Ajax revolutions. Each time, we are adding more complexity to handle asynchronous behaviour of data and events. How do we react to such asynchronous flow of user events and AJAX Data?
RxJS is a set of libraries for composing asynchronous and event-based programs. Every asynchronous data stream (that come from diverse sources, e.g., stock quote, tweets, computer events, web service requests, etc.) and user event stream is represented using the Observer object. Functions can then subscribe to such Observer and gets notified when an event occurs. Once notified, query operations like filter, project, aggregate, compose and time-based operations can be performed on those multiple event data by using RxJS operators.
Cancellation, exceptions, and synchronization are handled gracefully by using the methods on the Observable object.
A synopsis of this talk:
What is Functional Reactive Programming and How RxJS applies it?
Different operations defined in RxJS with examples.
How do we observe and subscribe to events?
An use case example using RxJS.
Vasanth Gopal, a Software Engineer at Indix, works on design & development of multiple web apps at Indix.
He has kickstarted apps, brought it to beta and scaled it for use by multiple customers. He has gone through phases starting from a concept to a prototype to a production ready version. He focuses on Front end development and on helping the engineering team deliver features rich in usability.