Chapter 1
The Reactive Way

The real world is pretty messy: events happen in random order, applications crash, and networks fail. Few applications are completely synchronous, and writing asynchronous code is necessary to keep applications responsive. Most of the time it’s downright painful, but it really doesn’t have to be.

Modern applications need super-fast responses and the ability to process data from different sources at the same time without missing a beat. Current techniques won’t get us there because they don’t scale—code becomes exponentially more complex as we add concurrency and application state. They get the job done only at the expense of a considerable mental load on the developer, and that leads to bugs and complexity in our code.

This chapter introduces you to reactive programming, a natural, easier way to think about asynchronous code. I’ll show you how streams of events—which we call Observables—are a beautiful way to handle asynchronous code. Then we’ll create an Observable and see how reactive thinking and RxJS dramatically improve on existing techniques and make you a happier, more productive programmer.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.5.12