Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning RxJava

You're reading from   Learning RxJava Reactive, Concurrent, and responsive applications

Arrow left icon
Product type Paperback
Published in Jun 2017
Publisher Packt
ISBN-13 9781787120426
Length 400 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Thomas Nield Thomas Nield
Author Profile Icon Thomas Nield
Thomas Nield
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Thinking Reactively FREE CHAPTER 2. Observables and Subscribers 3. Basic Operators 4. Combining Observables 5. Multicasting, Replaying, and Caching 6. Concurrency and Parallelization 7. Switching, Throttling, Windowing, and Buffering 8. Flowables and Backpressure 9. Transformers and Custom Operators 10. Testing and Debugging 11. RxJava on Android 12. Using RxJava for Kotlin New Appendix

Why should I learn RxJava?

 ReactiveX and RxJava paints a broad stroke against many problems programmers face daily, allowing you to express business logic and spend less time engineering code. Have you ever struggled with concurrency, event handling, obsolete data states, and exception recovery? What about making your code more maintainable, reusable, and evolvable so it can keep up with your business? It might be presumptuous to call reactive programming a silver bullet to these problems, but it certainly is a progressive leap in addressing them.

There is also growing user demand to make applications real time and responsive. Reactive programming allows you to quickly analyse and work with live data sources such as Twitter feeds or stock prices. It can also cancel and redirect work, scale with concurrency, and cope with rapidly emitting data. Composing events and data as streams that can be mixed, merged, filtered, split, and transformed opens up radically effective ways to compose and evolve code.

In summary, reactive programming makes many hard tasks easy, enabling you to add value in ways you might have thought impractical earlier. If you have a process written reactively and you discover that you need to run part of it on a different thread, you can implement this change in a matter of seconds. If you find network connectivity issues crashing your application intermittently, you can gracefully use reactive recovery strategies that wait and try again. If you need to inject an operation in the middle of your process, it is as simple as inserting a new operator. Reactive programming is broken up into modular chain links that can be added or removed, which can help overcome all the aforementioned problems quickly. In essence, RxJava allows applications to be tactical and evolvable while maintaining stability in production.

What we will learn in this book?

 As stated earlier, RxJava is the ReactiveX port for Java. In this book, we will focus primarily on RxJava 2.0, but I will call out significant differences in RxJava 1.0. We will place priority on learning to think reactively and leverage the practical features of RxJava. Starting with a high-level understanding, we will gradually move deeper into how RxJava works. Along the way, we will learn about reactive patterns and tricks to solve common problems programmers encounter.
 
 In Chapter 2, The Observable and Subscribers, Chapter 3, Basic Operators, and Chapter 4, Combining Observables, we will cover core Rx concepts with Observable, Observer, and Operator. These are the three core entities that make up RxJava applications. You will start writing reactive programs immediately and have a solid knowledge foundation to build on for the rest of the book.
 
Chapter 5, Multicasting, Replaying, and Caching, and Chapter 6, Concurrency and Parallelization, will explore more of the nuances of RxJava and how to effectively leverage concurrency.

In Chapter 7, Switching, Throttling, Windowing, and Buffering and Chapter 8, Flowables and Backpressure, we will learn about the different ways to cope with reactive streams that produce data/events faster than they can be consumed.

Finally, Chapter 9, Transformers and Custom Operators, Chapter 10, Testing and Debugging, Chapter 11, RxJava on Android, and Chapter 12, Using RxJava with Kotlin New, will touch on several miscellaneous (but essential) topics including custom operators as well as how to use RxJava with testing frameworks, Android, and the Kotlin language.

You have been reading a chapter from
Learning RxJava
Published in: Jun 2017
Publisher: Packt
ISBN-13: 9781787120426
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime