Reactive Programming with RxJS: Untangle Your Asynchronous JavaScript Code (Paperback)

Sergi Mansilla

  • 出版商: Pragmatic Bookshelf
  • 出版日期: 2015-12-19
  • 定價: $600
  • 售價: 9.5$570
  • 語言: 英文
  • 頁數: 144
  • 裝訂: Paperback
  • ISBN: 1680501291
  • ISBN-13: 9781680501292
  • 相關分類: JavaScript
  • 立即出貨 (庫存 < 4)

買這商品的人也買了...

相關主題

商品描述

Reactive programming is revolutionary. It makes asynchronous programming cleaner, intuitive, and robust. Discover how to use the RxJS library to write programs in a simpler way, unifying asynchronous mechanisms such as callbacks and promises into a single, powerful construct. Learn to think about your programs as streams of data that you can transform by expressing what should happen, instead of having to painstakingly program how it should happen. You'll be able to handle real-world concurrency and write complex flows of events in your applications with ease.

Create highly concurrent applications while writing simpler code using the Reactive Extensions for JavaScript (RxJS), a set of libraries for event composition. Programming real-world applications in JavaScript involves lots of asynchronous events--you might end up spending more time coordinating asynchronous code in your program than writing its actual functionality. This book introduces concepts and tools from reactive programming that will help you write cleaner and more robust asynchronous programs.

Find out about Observable sequences, a unifying data type to write highly concurrent code. Discover Schedulers and change the concept of time in your applications, making asynchronous testing sane again. Along the way you'll see real-world examples for the browser and Node.js, including a real-time earthquake visualization in 20 lines of code and a frantic shoot-'em-up space videogame. You'll also use Cycle.js - a modern, fully reactive web framework - to make a whole new breed of web applications.

By the end of the book, you'll know how to apply reactive programming to solve complex problems, build efficient programs with reactive user interfaces, and write your code more declaratively.

What You Need:

A modern web browser, Node.JS installed in your computer, and the RxJS JavaScript library.

商品描述(中文翻譯)

反應式編程是一種革命性的編程方式。它使得異步編程更加乾淨、直觀和強大。本書將介紹如何使用 RxJS 函式庫以更簡單的方式撰寫程式,將回呼和承諾等異步機制統一為一個強大的結構。通過將程式視為可以通過表達「應該發生什麼」來轉換的數據流,而不是繁瑣地編寫「應該如何發生」的程式,您將能夠輕鬆處理現實世界的並發性,並在應用程序中編寫複雜的事件流程。

使用 JavaScript 的反應式擴展(RxJS)這套事件組合庫,您可以創建高度並發的應用程序,同時編寫更簡潔的程式碼。在 JavaScript 中編寫現實世界的應用程序涉及大量的異步事件,您可能會花更多時間協調程式中的異步代碼,而不是編寫實際功能。本書介紹了反應式編程的概念和工具,將幫助您編寫更乾淨、更強大的異步程式。

了解 Observable 序列,這是一種統一的數據類型,可用於編寫高度並發的程式碼。發現調度器(Schedulers)並改變應用程序中的時間概念,使異步測試再次變得合理。在此過程中,您將看到瀏覽器和 Node.js 的實際示例,包括一個僅需 20 行代碼的實時地震可視化和一個瘋狂的射擊太空遊戲。您還將使用 Cycle.js - 一個現代、完全反應式的 Web 框架 - 創建全新類型的 Web 應用程序。

通過閱讀本書,您將學會如何應用反應式編程解決複雜問題,構建具有反應式用戶界面的高效程序,並以更具聲明性的方式編寫代碼。

所需材料:
- 一個現代的網頁瀏覽器
- 在您的電腦上安裝 Node.js
- RxJS JavaScript 函式庫