Reactive Android Programming

Reactive Android Programming
by Tadas Subonis / / / AZW3


Read Online 2.9 MB Download


Key Features

Install and set up RxJava for android development

Implement the reactive paradigm for Android programming using RxJava

Create cutting edge real world android apps with reactive programming.

Book Description

Writing code on Android is hard. Writing a high quality code that involves concurrent and parallel tasks is even harder. Ensuring that this code will run without unforeseen race conditions is on the order of magnitude harder. RxJava is the tool that can help write code for such tasks.

In this book a novice developer will be introduced to a wide variety of tools that RxJava provides to enable them to produce robust and high-quality code for their asynchronous tasks by building a relatively simple application that will use advanced RxJava techniques to produce a high quality product.

First of all, the book will lead a developer through RxJava an initial setup in Android environment in Part 1. Later in the second part the reader will learn RxJava 2.0 step-by-step by starting off with stock data processing and display. Together with this a developer will learn to choose appropriate Schedulers and to use Retrofit library for remote requests. Further in Part 3, the reader will also learn advanced topics such as adding integration to Twitter to process its streaming data by combining it with stock data.

What you will learn

Setup the environment for asynchronous android programming

Write custom observables and higher level abstractions

Orchestrate multiple calls using Reactive principles

Fetch remote financial data using RxJava

Integrate and process Twitter streams gracefully

Utilize reactive programming for developing interactive and responsive android apps

About the Author

Tadas Subonis had started coding roughly when he was thirteen. Since then, he has done programming with PHP, JavaScript, Python, C++, and Java (the language in which he probably has written the most code). He took onto Android relatively recently – around 2014 (while he had a few more gentle tries in 2012).

However, he has soon learned that Android lacks a decent support for asynchronous programming (Async Task was/is a joke) while more reckless languages such as JavaScript had Promises for a long time. Furthermore, Java’s standard library was lacking a decent support for functional programming primitives (map, filter) but that was easily fixable with libraries such as Guava.

This lead me to a search of a library that would help me achieve Promise-like functionality and interface. It didn’t take long until I’ve found ReactiveX and their family of implementations (including RxJava) to handle streams in reactive fashion. It wasn’t exactly the flow of Promised-like systems but soon enough I’ve realized that it’s something even more powerful.

Since then, he has been using RxJava (and RxKotlin) for his daily Android programming. The quality of the code (lack of bugs, readability, and maintainability) improved ten-fold. Snappy and crash-free experience for the users of your application is a must these days when competition for user attention on app marketplaces is getting fiercer and fiercer.

views: 765