JSFoo 2017

JSFoo is a conference about JavaScript and everything related.

Sudipta Sen

@sanborn

RxJS Observables & Angular2 HTTP

Submitted Mar 13, 2017

Do you know how useful observables are while talking about reactive programming? You might have done a lot of reactive programming knowingly or un knowingly in your daily life and now ReactiveX made it more fun and easy. This talk is about the usefulness of Observables and real life use cases of Observables in an Angular2 applications with HTTP. Promises are good for solving asynchronous operations such as querying a service with an XMLHttpRequest, where the expected behavior is one value and then completion. The Reactive Extensions for JavaScript unifies both the world of Promises, callbacks as well as evented data such as DOM Input, Web Workers, Web Sockets. Once we have unified these concepts, this enables rich composition. ReactiveX is the combination of best ideas from observer pattern, the iterator pattern, and functional programming.

Outline

  • Introduction to ReactiveX
  • What is Observable
  • How to create an Observable
  • How to subscribe (/ unsubscribe) to an Observable
  • Handling errors in observables
  • Observable retry mechanism
  • Few other operators (mergeMap and combineLates, more if there is time)
  • Live example with Angular2 HTTP example with real life scenario
  • Promises Vs Observable (Live example with real life scenario)

Speaker bio

Sudipta is a code enthusiast, currently working for Red Hat Bangalore as a UI developer. He used to be a backend developer before he started his journey in Javascript with ReactJS almost one and half year back. He loves open source technologies and always open to learn new things. He believes in “Everything is a skill”. While not coding, he is travelling with his camera. He loves flying airplane simulators.

Slides

https://speakerdeck.com/sanbornsen/rxjs-observables-and-angular2-http

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

JSFoo is a forum for discussing UI engineering; fullstack development; web applications engineering, performance, security and design; accessibility; and latest developments in #JavaScript. Follow JSFoo on Twitter more