Learning RxJava

Reactive Programming with Java and ReactiveX
Preview in Mapt

Learning RxJava

Thomas Nield

6 customer reviews
Reactive Programming with Java and ReactiveX
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$49.99
$29.99 p/m after trial
RRP $35.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Learning RxJava Book Cover
Learning RxJava
$ 35.99
$ 25.20
Mastering Machine Learning Algorithms Book Cover
Mastering Machine Learning Algorithms
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $36.98
Add to Cart

Book Details

ISBN 139781787120426
Paperback400 pages

Book Description

RxJava is a library for composing asynchronous and event-based programs using Observable sequences for the JVM, allowing developers to build robust applications in less time.

Learning RxJava addresses all the fundamentals of reactive programming to help readers write reactive code, as well as teach them an effective approach to designing and implementing reactive libraries and applications.

Starting with a brief introduction to reactive programming concepts, there is an overview of Observables and Observers, the core components of RxJava, and how to combine different streams of data and events together. You will also learn simpler ways to achieve concurrency and remain highly performant, with no need for synchronization. Later on, we will leverage backpressure and other strategies to cope with rapidly-producing sources to prevent bottlenecks in your application. After covering custom operators, testing, and debugging, the book dives into hands-on examples using RxJava on Android as well as Kotlin.

Table of Contents

Chapter 1: Thinking Reactively
A brief history of ReactiveX and RxJava
Thinking reactively
Why should I learn RxJava?
Setting up
A quick exposure to RxJava
RxJava 1.0 versus RxJava 2.0 - which one do I use?
When to use RxJava
Summary
Chapter 2: Observables and Subscribers
The Observable
The Observer interface
Cold versus hot Observables
Other Observable sources
Single, Completable, and Maybe
Disposing
Summary
Chapter 3: Basic Operators
Suppressing operators
Transforming operators
Reducing operators
Collection operators
Error recovery operators
Action operators
Summary
Chapter 4: Combining Observables
Merging
Concatenation
Ambiguous
Zipping
Combine latest
Grouping
Summary
Chapter 5: Multicasting, Replaying, and Caching
Understanding multicasting
Automatic connection
Replaying and caching
Subjects
Summary
Chapter 6: Concurrency and Parallelization
Why concurrency is necessary
Concurrency in a nutshell
Introducing RxJava concurrency
Understanding Schedulers
Understanding subscribeOn()
Understanding observeOn()
Parallelization
unsubscribeOn()
Summary
Chapter 7: Switching, Throttling, Windowing, and Buffering
Buffering
Windowing
Throttling
Switching
Grouping keystrokes
Summary
Chapter 8: Flowables and Backpressure
Understanding backpressure
Understanding the Flowable and Subscriber
Creating a Flowable
Using onBackpressureXXX() operators
Using Flowable.generate()
Summary
Chapter 9: Transformers and Custom Operators
Transformers
Using to() for fluent conversion
Operators
Custom Transformers and operators for Singles, Maybes, and Completables
Using RxJava2-Extras and RxJava2Extensions
Summary
Chapter 10: Testing and Debugging
Configuring JUnit
Blocking subscribers
Blocking operators
Using TestObserver and TestSubscriber
Manipulating time with the TestScheduler
Debugging RxJava code
Summary
Chapter 11: RxJava on Android
Creating the Android project
Using RxJava and RxAndroid
Other RxAndroid bindings libraries
Life cycles and cautions using RxJava with Android
Summary
Chapter 12: Using RxJava for Kotlin New
Why Kotlin?
Configuring Kotlin
Kotlin basics
Extension operators
Using RxKotlin
Dealing with SAM ambiguity
Using let() and apply()
Tuples and data classes
Future of ReactiveX and Kotlin
Summary
Chapter 13: Appendix
Introducing lambda expressions
Functional types
Mixing object-oriented and reactive programming
Materializing and Dematerializing
Understanding Schedulers

What You Will Learn

  • Learn the features of RxJava 2 that bring about many significant changes, including new reactive types such as Flowable, Single, Maybe, and Completable
  • Understand how reactive programming works and the mindset to "think reactively"
  • Demystify the Observable and how it quickly expresses data and events as sequences
  • Learn the various Rx operators that transform, filter, and combine data and event sequences
  • Leverage multicasting to push data to multiple destinations, and cache and replay them
  • Discover how concurrency and parallelization work in RxJava, and how it makes these traditionally complex tasks trivial to implement
  • Apply RxJava and Retrolambda to the Android domain to create responsive Android apps with better user experiences
  • Use RxJava with the Kotlin language to express RxJava more idiomatically with extension functions, data classes, and other Kotlin features

Authors

Table of Contents

Chapter 1: Thinking Reactively
A brief history of ReactiveX and RxJava
Thinking reactively
Why should I learn RxJava?
Setting up
A quick exposure to RxJava
RxJava 1.0 versus RxJava 2.0 - which one do I use?
When to use RxJava
Summary
Chapter 2: Observables and Subscribers
The Observable
The Observer interface
Cold versus hot Observables
Other Observable sources
Single, Completable, and Maybe
Disposing
Summary
Chapter 3: Basic Operators
Suppressing operators
Transforming operators
Reducing operators
Collection operators
Error recovery operators
Action operators
Summary
Chapter 4: Combining Observables
Merging
Concatenation
Ambiguous
Zipping
Combine latest
Grouping
Summary
Chapter 5: Multicasting, Replaying, and Caching
Understanding multicasting
Automatic connection
Replaying and caching
Subjects
Summary
Chapter 6: Concurrency and Parallelization
Why concurrency is necessary
Concurrency in a nutshell
Introducing RxJava concurrency
Understanding Schedulers
Understanding subscribeOn()
Understanding observeOn()
Parallelization
unsubscribeOn()
Summary
Chapter 7: Switching, Throttling, Windowing, and Buffering
Buffering
Windowing
Throttling
Switching
Grouping keystrokes
Summary
Chapter 8: Flowables and Backpressure
Understanding backpressure
Understanding the Flowable and Subscriber
Creating a Flowable
Using onBackpressureXXX() operators
Using Flowable.generate()
Summary
Chapter 9: Transformers and Custom Operators
Transformers
Using to() for fluent conversion
Operators
Custom Transformers and operators for Singles, Maybes, and Completables
Using RxJava2-Extras and RxJava2Extensions
Summary
Chapter 10: Testing and Debugging
Configuring JUnit
Blocking subscribers
Blocking operators
Using TestObserver and TestSubscriber
Manipulating time with the TestScheduler
Debugging RxJava code
Summary
Chapter 11: RxJava on Android
Creating the Android project
Using RxJava and RxAndroid
Other RxAndroid bindings libraries
Life cycles and cautions using RxJava with Android
Summary
Chapter 12: Using RxJava for Kotlin New
Why Kotlin?
Configuring Kotlin
Kotlin basics
Extension operators
Using RxKotlin
Dealing with SAM ambiguity
Using let() and apply()
Tuples and data classes
Future of ReactiveX and Kotlin
Summary
Chapter 13: Appendix
Introducing lambda expressions
Functional types
Mixing object-oriented and reactive programming
Materializing and Dematerializing
Understanding Schedulers

Book Details

ISBN 139781787120426
Paperback400 pages
Read More
From 6 reviews

Read More Reviews

Recommended for You

Java 9 Concurrency Cookbook - Second Edition Book Cover
Java 9 Concurrency Cookbook - Second Edition
$ 39.99
$ 28.00
Programming Kotlin Book Cover
Programming Kotlin
$ 35.99
$ 25.20
Reactive Android Programming Book Cover
Reactive Android Programming
$ 31.99
$ 22.40
Mastering Spring 5.0 Book Cover
Mastering Spring 5.0
$ 39.99
$ 28.00
Spring 5.0 Microservices - Second Edition Book Cover
Spring 5.0 Microservices - Second Edition
$ 39.99
$ 28.00
Learning Network Programming with Java Book Cover
Learning Network Programming with Java
$ 39.99
$ 28.00