Learning Reactive Programming with Java 8

Learn how to use RxJava and its reactive Observables to build fast, concurrent, and powerful applications through detailed examples

Learning Reactive Programming with Java 8

This ebook is included in a Mapt subscription
Nickolay Tsvetinov

2 customer reviews
Learn how to use RxJava and its reactive Observables to build fast, concurrent, and powerful applications through detailed examples
$0.00
$18.00
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785288722
Paperback182 pages

Book Description

Whether you are a Java expert or at a beginner level, you'll benefit from this book, because it will teach you a brand new way of coding and thinking.

The book starts with an explanation of what reactive programming is, why it is so appealing, and how we can integrate it in to Java. It continues by introducing the new Java 8 syntax features, such as lambdas and function references, and some functional programming basics. From this point on, the book focuses on RxJava in depth. It goes through creating Observables, transforming, filtering, and combining them, and concurrency and testing to finish with extending the library itself.

This book is a definite tutorial in RxJava filled with a lot of well-described examples. It explains reactive programming concepts in plain and readable language, without scientific formulas and terms.

Table of Contents

Chapter 1: An Introduction to Reactive Programming
What is reactive programming?
Why should we be reactive?
Introducing RxJava
Summary
Chapter 2: Using the Functional Constructions of Java 8
Lambdas in Java 8
Implementing the reactive sum example with lambdas
Pure functions and higher order functions
Summary
Chapter 3: Creating and Connecting Observables, Observers, and Subjects
The Observable.from method
The Observable.just method
Other Observable factory methods
The Observable.create method
Subscribing and unsubscribing
Hot and cold Observable instances
The Subject instances
Summary
Chapter 4: Transforming, Filtering, and Accumulating Your Data
Observable transformations
Filtering data
Accumulating data
Summary
Chapter 5: Combinators, Conditionals, and Error Handling
Combining the Observable instances
The conditional operators
Handling errors
An HTTP client example
Summary
Chapter 6: Using Concurrency and Parallelism with Schedulers
RxJava's schedulers
Buffering, throttling, and debouncing
Summary
Chapter 7: Testing Your RxJava Application
Testing using simple subscription
The BlockingObservable class
The aggregate operators and the BlockingObservable class
Testing with the aggregate operators and the BlockingObservable class
Using the TestSubscriber class for in-depth testing
Testing asynchronous Observable instances with the help of the TestScheduler class
Summary
Chapter 8: Resource Management and Extending RxJava
Resource management
Caching data with Observable.cache
Creating custom operators with lift
Composing multiple operators with the Observable.compose operator
Summary

What You Will Learn

  • Discover what reactive programming is and how you can benefit from it
  • Get to grips with the new functional features of Java 8 and some functional theory
  • Create RxJava Observable instances from virtually any data source
  • Transform, filter, and accumulate your data using various RxJava operators
  • Combine multiple data sources in one dataset, using custom logic
  • Write concurrent programs with ease, scheduling actions on various workers
  • Learn about unit testing asynchronous RxJava logic
  • Extend RxJava by writing your own operators and factory methods

Authors

Table of Contents

Chapter 1: An Introduction to Reactive Programming
What is reactive programming?
Why should we be reactive?
Introducing RxJava
Summary
Chapter 2: Using the Functional Constructions of Java 8
Lambdas in Java 8
Implementing the reactive sum example with lambdas
Pure functions and higher order functions
Summary
Chapter 3: Creating and Connecting Observables, Observers, and Subjects
The Observable.from method
The Observable.just method
Other Observable factory methods
The Observable.create method
Subscribing and unsubscribing
Hot and cold Observable instances
The Subject instances
Summary
Chapter 4: Transforming, Filtering, and Accumulating Your Data
Observable transformations
Filtering data
Accumulating data
Summary
Chapter 5: Combinators, Conditionals, and Error Handling
Combining the Observable instances
The conditional operators
Handling errors
An HTTP client example
Summary
Chapter 6: Using Concurrency and Parallelism with Schedulers
RxJava's schedulers
Buffering, throttling, and debouncing
Summary
Chapter 7: Testing Your RxJava Application
Testing using simple subscription
The BlockingObservable class
The aggregate operators and the BlockingObservable class
Testing with the aggregate operators and the BlockingObservable class
Using the TestSubscriber class for in-depth testing
Testing asynchronous Observable instances with the help of the TestScheduler class
Summary
Chapter 8: Resource Management and Extending RxJava
Resource management
Caching data with Observable.cache
Creating custom operators with lift
Composing multiple operators with the Observable.compose operator
Summary

Book Details

ISBN 139781785288722
Paperback182 pages
Read More
From 2 reviews

Read More Reviews