0%

Book Description

Reactive programming is revolutionary. It makes asynchronous programming clean, intuitive, and robust. Use RxJS 5 to write complex programs in a simple way, and master the Observable: a powerful data type that substitutes callbacks and promises. Think about your programs as streams of data that change and adapt to produce what you want. Manage real-world concurrency and write complex flows of events in your applications with ease. Take advantage of Schedulers to make asynchronous testing easier. The code in this new edition is completely updated for RxJS 5 and ES6.

Create concurrent applications with ease using RxJS 5, a powerful event composition library. Real-world JavaScript applications require you to master asynchronous programming, and chances are that you'll spend more time coordinating asynchronous events than writing actual functionality. This book introduces concepts and tools that will greatly simplify the process of writing asynchronous programs.

Find out about Observables, a unifying data type that simplifies concurrent code and eases the pain of callbacks. Learn how Schedulers change the concept of time itself, making asynchronous testing sane again. Find real-world examples for the browser and Node.js along the way: how about a real-time earthquake visualization in 20 lines of code, or a frantic shoot-'em-up space videogame? You'll also use Cycle.js - a modern, reactive, web framework - to make a new breed of web applications.

By the end of the book, you'll know how to think in a reactive way, and to use RxJS 5 to build complex programs and create amazing reactive user interfaces. You'll also understand how to integrate it with your existing projects and use it with the frameworks you already know. All the code in this new edition has been thoroughly revised and updated for RxJS 5, ES6, and Cycle.js Unified.

What You Need:



NodeJS 6.x and a modern web browser

Table of Contents

  1.  Acknowledgments
  2.  Preface
    1. New World, Old Methods
    2. What Is Reactive Programming?
    3. What Is RxJS?
    4. Who This Book Is For
    5. What’s in This Book
    6. Running the Code Examples
    7. Resources
    8. Download Sample Code
  3. 1. The Reactive Way
    1. What’s Reactive?
    2. Observers and Iterators
    3. The Rx Pattern and the Observable
    4. Creating Observables
    5. Wrapping Up
  4. 2. Deep in the Sequence
    1. Visualizing Observables
    2. Basic Sequence Operators
    3. Canceling Sequences
    4. Handling Errors
    5. Making a Real-Time Earthquake Visualizer
    6. Ideas for Improvements
    7. Operator Rundown
    8. Wrapping Up
  5. 3. Building Concurrent Programs
    1. Purity and the Observable Pipeline
    2. RxJS’s Subject Class
    3. Spaceship Reactive!
    4. Ideas for Improvements
    5. Wrapping Up
  6. 4. Building a Complete Web Application
    1. Building a Real-Time Earthquake Dashboard
    2. Adding a List of Earthquakes
    3. Getting Real-Time Updates from Twitter
    4. Ideas for Improvements
    5. Wrapping Up
  7. 5. Bending Time with Schedulers
    1. Using Schedulers
    2. Scheduling for Animations
    3. Testing with Schedulers
    4. Wrapping Up
  8. 6. Reactive Web Applications with Cycle.js
    1. Cycle.js
    2. Installing Cycle.js
    3. Our Project: Wikipedia Search
    4. Model-View-Intent
    5. Creating Reusable Widgets
    6. Ideas for Improvements
    7. Wrapping Up
3.18.220.243