Preface

In a world where there is a smartphone in every pocket, designing and building applications that can run smoothly and provide a user experience that users will enjoy is the only way to go. The reactive programming style with RxJava will help you beat Android Platform limitations to create astonishing Android Apps.

This book will be a practical journey, from the basics of reactive programming and Observer pattern concepts, to the main feature of RxJava, which will be accompanied by practical code examples and a real-world app.

I'll show you how to create an Observable from "scratch", from a list, or from a function that we already have in our codebase. You will learn how to filter an Observable sequence to create a new sequence, containing only the values we want; you will also learn how to apply a function to an Observable and how to concatenate, merge, or zip Observables. I'll show you how to enjoy RxAndroid Schedulers to overcome the threading and concurrency hell in Android.

The book will wind up with a practical example of RxJava combined with Retrofit to easily communicate with a REST API.

What this book covers

Chapter 1, RX – from .NET to RxJava, takes initial steps into the reactive world. We will compare the reactive approach with the classic approach, and will explore the similarities and differences between them.

Chapter 2, Why Observables?, gives an overview of the Observer pattern, how it's implemented and extended by RxJava, what an Observable is, and how Observables relate to Iterables.

Chapter 3, Hello Reactive World, uses what we have learned so far to create our first reactive Android app.

Chapter 4, Filtering Observables, dives into the essence of an Observable sequence: filtering. We will also learn how to select only the values we want from an emitting Observable, how to obtain a finite number of values, how to handle overflow scenarios, and a few more useful tricks.

Chapter 5, Transforming Observables, shows how to transform Observable sequences to create sequences that can fit our needs.

Chapter 6, Combining Observables, digs into combining functions, and we are going to learn how to work with multiple Observables simultaneously when we create the Observable we want.

Chapter 7, Schedulers – Defeating the Android MainThread Issue, shows you how to work with multithreading and concurrent programming using RxJava Schedulers. We will create network operations, memory accesses, and time-consuming tasks in a reactive way.

Chapter 8, REST in Peace – RxJava and Retrofit, teaches you how Retrofit by Square can be used with RxJava to create an REST client efficiently and effectively.

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

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