Build Reactive Websites with RxJS
Master Observables and Wrangle Events
by: Randall Koutnik
Published | 2018-12-15 |
---|---|
Internal code | rkrxjs |
Print status | In Print |
Pages | 194 |
User level | Intermediate |
Keywords | reactive, observable, asynchronous, JavaScript, front-end, scheduler, streams |
Related titles | Reactive Programming with RxJS |
ISBN | 9781680502954 |
Other ISBN |
Channel epub: 9781680506501 Channel PDF: 9781680506518 Kindle: 9781680506488 Safari: 9781680506495 Kindle: 9781680506488 |
BISACs | COM051260 COMPUTERS / Programming Languages / JavaScriptCOM060160 COMPUTERS / Web / Web ProgrammingCOM060160 COMPUTERS / Web / Web Programming |
Highlight
Upgrade your skill set, succeed at work, and above all, avoid the many headaches that come with modern front-end development. Simplify your codebase with hands-on examples pulled from real-life applications. Master the mysteries of asynchronous state management, detangle puzzling race conditions, and send spaceships soaring through the cosmos. When you finish this book, you’ll be able to tame the wild codebeasts before they ever get a chance to wreck your day.
Description
The front-end world can be fraught with complexity. The RxJS library offers a solution: Observables. Observables merge other JavaScript asynch mechanisms such as callbacks and promises into a new way of looking at data. Instead of dealing with objects and keeping track of their state, Observables view asynchronous events as a stream. RxJS provides you the tools to manage, manipulate, and process Observables to simplify and speed up your front-end applications.
Never fear, you’re in exactly the right place. Don’t worry about getting stuck in a mire of theory. Start off with the basics, building small applications that illustrate deeper points. Take those building blocks and apply them to much more complex problems like handling asynchronous state and dodging race conditions before they happen. Once you’ve got a handle on complex problems, take a leap into architecture, discovering how to structure an Observable-based application both without a framework and in the land of Angular 2. After mastering Observables, switch gears to building a canvas-based game, demonstrating your deep understanding of the flexibility of Observables.
Master the Observable with RxJS, and make your asynchronous JavaScript code that much cleaner and simpler.
Contents and Extracts
- <b>Introduction</b>
- The Goal of This Book
- But I Already Use (Insert Framework Here)!
- How to Read This Book
- Setting Up the Environment
- Online Resources
- Acknowledgments
- Creating Observables
- Introducing Rx Concepts
- Building a Stopwatch <b>excerpt</b>
- Using a Subscription
- Experimenting with Observables
- What We Learned
- Manipulating Streams
- Translating Pig Latin with Flatten and Reduce
- Flattening
- Reducing
- Debugging an Observable Stream
- Typeahead
- What We Learned
- Managing Asynchronous Events
- Making AJAX Requests
- Handling Errors
- Promises vs. Observables with AJAX
- Loading with Progress Bar <b>excerpt</b>
- When Good AJAX Goes Bad
- Progressive and Ordered Loading
- What We Learned
- Advanced Async
- The Spec
- Preventing Race Conditions with switchMap
- Debouncing Events
- Adding Debounce to the Typeahead
- Building a Stock Ticker
- What We’ve Learned
- Multiplexing Observables
- The Problem with Cold Observables
- Multicasting with the Subject Class
- Building a Chat Room <b>excerpt</b>
- What We Learned
- Using HTTP in Angular
- Generating a New Project
- Displaying Returned Data
- Saving New Data
- Routing to Components
- Linking Between Components
- Editing a Single Photo
- Adding in Analytics
- Intercepting HTTP Calls
- What We Learned
- Building Reactive Forms in Angular
- Building a Phone Number Input
- Creating a Phone Input with Angular
- Validating an Input
- Building a Pizzeria Registration Form
- Using Advanced Validation
- Creating a Pizza Ordering Form
- What We Learned
- Advanced Angular
- Building Performant Applications
- Managing State with ngrx
- What We Learned
- Reactive Game Development
- Creating Your Own Operator
- Animating Objects
- Calling next with Schedulers
- Architecting a Game
- Tracking User Input
- Creating Enemies
- Detecting Collisions
- What We Learned
- Bonus Points