Mastering Reactive JavaScript

Expand your boundaries by creating applications empowered with real-time data using RxJs without compromising performance

Mastering Reactive JavaScript

Erich de Souza Oliveira

2 customer reviews
Expand your boundaries by creating applications empowered with real-time data using RxJs without compromising performance
Mapt Subscription
FREE
$29.99/m after trial
eBook
$22.40
RRP $31.99
Save 29%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$22.40
$39.99
$29.99p/m after trial
RRP $31.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781786463388
Paperback310 pages

Book Description

If you’re struggling to handle a large amount of data and don’t know how to improve your code readability, then reactive programming is the right solution for you. It lets you describe how your code behaves when changes happen and makes it easier to deal with real-time data. This book will teach you what reactive programming is, and how you can use it to write better applications.

The book starts with the basics of reactive programming, what Reactive Extensions is, and how can you use it in JavaScript along with some reactive code using Bacon. Next, you’ll discover what an Observable and an Observer are and when to use them.You'll also find out how you can query data through operators, and how to use schedulers to react to changes.

Moving on, you’ll explore the RxJs API, be introduced to the problem of data traffic (backpressure), and see how you can mitigate it. You’ll also learn about other important operators that can help improve your code readability, and you’ll see how to use transducers to compose operators.

At the end of the book, you’ll get hands-on experience of using RxJs, and will create a real-time web chat using RxJs on the client and server, providing you with the complete package to master RxJs.

Table of Contents

Chapter 1: What Does Being Reactive Mean?
The reactive paradigm
Why do I need it?
Installation of tools
Your first code using reactive programming
Summary
Chapter 2: Reacting for the First Time
The bacon.js observables
Reacting to changes
Reading how an operator works
Transforming events using bacon.js
Summary
Chapter 3: A World Full of Changes - Reactive Extensions to the Rescue
RxJS observables
Subscribing to changes (Observer)
RxJS Subjects
RxJS Disposable
RxJS Schedulers
Summary
Chapter 4: Transforming Data - Map, Filter, and Reduce
Adding operators to observables
The map() operator
The flatMap() operator
The filter() operator
The reduce() operator
Summary
Chapter 5: The World Changes Too Fast - Operators to Deal with Backpressure
What is backpressure?
Common strategies to deal with backpressure
More ways to filter data
Summary
Chapter 6: Too Many Sources - Combining Observables
When do I need to combine observables?
Running observables
Concatenating observables
Combining observables
Summary
Chapter 7: Something is Wrong - Testing and Dealing with Errors
Dealing with errors
Acting when an error occurs
Summary
Chapter 8: More about Operators
The road so far
The fundamentals of RxJS
Going beyond the basics
Other important operators
Summary
Chapter 9: Composition
What is a transducer?
Available transducer implementations for JavaScript
The transducers-js API
Using transducers
Using transducers with RxJS
Testing transducers
A performance comparison for JavaScript code using transducers
Summary
Chapter 10: A Real-Time Server
The web chat server
Creating the project
The architecture of the server
Implementing the server
Scaling the server
Summary
Chapter 11: A Real-Time Client
Installing dependencies
The structure of our client
Building the application for the first time
Connecting to the server application
Using RxJS to manage user input
Connecting user interactions and server communication
Improving interaction with RxJS
Batching changes to the DOM
Testing the application
Summary

What You Will Learn

  • Get to know the basics of functional reactive programming using RxJs
  • Process a continuous flow of data with linear memory consumption
  • Filter, group, and react to changes in your system
  • Discover how to deal with data traffic
  • Compose operators to create new operators and use them in multiple observables to avoid code repetition
  • Explore transducers and see how they can improve your code readability
  • Detect and recover from errors in observables using Retry and Catch operators
  • Create your own reactive application: a real-time webchat

Authors

Table of Contents

Chapter 1: What Does Being Reactive Mean?
The reactive paradigm
Why do I need it?
Installation of tools
Your first code using reactive programming
Summary
Chapter 2: Reacting for the First Time
The bacon.js observables
Reacting to changes
Reading how an operator works
Transforming events using bacon.js
Summary
Chapter 3: A World Full of Changes - Reactive Extensions to the Rescue
RxJS observables
Subscribing to changes (Observer)
RxJS Subjects
RxJS Disposable
RxJS Schedulers
Summary
Chapter 4: Transforming Data - Map, Filter, and Reduce
Adding operators to observables
The map() operator
The flatMap() operator
The filter() operator
The reduce() operator
Summary
Chapter 5: The World Changes Too Fast - Operators to Deal with Backpressure
What is backpressure?
Common strategies to deal with backpressure
More ways to filter data
Summary
Chapter 6: Too Many Sources - Combining Observables
When do I need to combine observables?
Running observables
Concatenating observables
Combining observables
Summary
Chapter 7: Something is Wrong - Testing and Dealing with Errors
Dealing with errors
Acting when an error occurs
Summary
Chapter 8: More about Operators
The road so far
The fundamentals of RxJS
Going beyond the basics
Other important operators
Summary
Chapter 9: Composition
What is a transducer?
Available transducer implementations for JavaScript
The transducers-js API
Using transducers
Using transducers with RxJS
Testing transducers
A performance comparison for JavaScript code using transducers
Summary
Chapter 10: A Real-Time Server
The web chat server
Creating the project
The architecture of the server
Implementing the server
Scaling the server
Summary
Chapter 11: A Real-Time Client
Installing dependencies
The structure of our client
Building the application for the first time
Connecting to the server application
Using RxJS to manage user input
Connecting user interactions and server communication
Improving interaction with RxJS
Batching changes to the DOM
Testing the application
Summary

Book Details

ISBN 139781786463388
Paperback310 pages
Read More
From 2 reviews

Read More Reviews

Recommended for You

Mastering PostCSS for Web Design Book Cover
Mastering PostCSS for Web Design
$ 35.99
$ 25.20
Applied Network Security Book Cover
Applied Network Security
$ 35.99
$ 25.20
Mastering Meteor: Powerful Reactive Applications with Full-Stack JavaScript [Video] Book Cover
Mastering Meteor: Powerful Reactive Applications with Full-Stack JavaScript [Video]
$ 94.99
$ 80.75
Reactive JavaScript Programming [Video] Book Cover
Reactive JavaScript Programming [Video]
$ 124.99
$ 106.25
Reactive Programming with JavaScript Book Cover
Reactive Programming with JavaScript
$ 39.99
$ 28.00
Mastering Functional JavaScript Libraries [Video] Book Cover
Mastering Functional JavaScript Libraries [Video]
$ 124.99
$ 106.25