Rxjava Android Developers - Programming Ebook


Download Programming Ebook

Thursday, May 21, 2020

Rxjava Android Developers

Rxjava Android Developers Reactivex Frp
Rxjava Android Developers Reactivex Frp

Book Details 
             TitleRxjava Android Developers
         Author: Timo Tuominen
     Publisher: Hacking with Swift
    Language: English
No. of pages: 513
         Format: PDF, EPUB


Funnily enough, my story of reactive programming started on one of the less-reactive platforms: Adobe Flash. Macromedia, before its acquisition by Adobe, built a sleek framework called Flex (later called Apache Flex). In Flex, one of the main concepts was the setData function of every rendering component. The setData function was intended to receive a data object that fully contained the information that the component was tasked to present. Having spent my younger years writing crafty DirectX C++ code, this was a beautiful separation of concerns, though I never quite fully figured out how the data was intended to be transformed between its original source and what the component expected to receive.

Fast-forward around six years and a few platforms, and I was starting a project with Samsung. On the way, during my time at the company Futurice, I tried to apply what I’d learned from Flex in different contexts with varying results—but ended up with more conceptual questions than answers.

Android And Kotlin Bundle Books From Ray Wenderlich

This time, the task was to create a real-time sports application on Android with a range of data sources in different forms and delays. We’d often receive partial data that would be used to update, say, the match score only. It seemed like a nontrivial system to build with the standard tools. As the classic story goes, my colleague Juha Ristolainen had read a blog post about the new tool that could help: RxJava. I thought I’d give it a go.

I have to admit, learning and applying RxJava to my problem domain of data processing was one of the two most profound experiences I’ve had learning a new technology. Ironically, the first one was when I picked up my first programming book on Java 20 years ago. Seeing what RxJava enabled was much like finding the one missing piece of the puzzle over and over again, to the point where I didn’t even realize I’d been missing them.Four years later, it turned out RxJava was not quite as simple to use as it was conceptually powerful. Having chosen my fight, my colleague Olli Jokinen and I spent numerous nights trying to meet deadlines with an unexplored technology. This was the time when RxJava 1 was still in beta. Eventually, we ironed out the issues from our code, and the codebase ended up as one of the most brilliant ones I’ve had the pleasure to work with.

What you have in your hands is the book based on thousands of hours of writing Android apps with RxJava. This is the book I wish I had when I started.


I would like to thank my father and my late mother for getting me my first computer and giving their unquestionable support in anything I have ever aspired to do; my neighbor Jari Nummela for letting me read his computer magazines; my cousin Eero Salminen for downloading the Java Development Kit and burning it on a CD; and my local library at Ulvila for satisfying my desire to learn more about programming patterns.

Regarding my professional career, I wish to wholeheartedly thank software agency Futurice and everyone there I have had the pleasure to work with: Mikko Viikari and Lenita Syrjänen for hiring me; Hannu Nevanlinna for encouraging my technical explorations; Michael Samarin for teaching me to be more precise with my time; Mikko Vihonen and Harri Kauhanen for being my first guides in the enterprise environment; Sampo Hämäläinen and Lauri Eloranta for dragging me along on their business ventures; and Tuomas Syrjänen for being a good enough CEO to put a picture of me on the wall.

My most sincere gratitude to the entire Samsung Kick team: Clement Courdeau for driving the whole thing; Olli Jokinen for being there for the whole ride; Antti Poikela and Pawel Polanski for stretching the limits of RxJava; Juha Ristolainen for choosing RxJava; Lauri Larjo, Lauri Eloranta, and Sampo Hämäläinen for somehow managing it all; Ikhoon Chon and Hongkyu Park for keeping the backend together; Iiro Isotalo, Mark Schlussnuss, and Chris Houghton for making kick-ass designs; and everyone in the Kick Android team

for their unfaltering support: Aniello Del Sorbo, Guillaume Valverde, Johan Paul, Johnny Cullan, Jose Martinez, Lauri Larjo, Susanne Husebø, and Sunghyun Park. Additionally, special thanks to Guillaume Valverde for creating our first RxJava training together.

Lastly, I would like to thank Kuba Misiorny and Antti Poikela for reviewing early versions
of the book as well as the amazing people at Manning without whom this book wouldn’t have happened at all. Special thanks to Bert Bates for teaching me how to write books, Christina Taylor for having the patience to deal with us, and each of the following reviewers for their hard work and attention to detail: Alain Couniot, Anderson Silva, Barry Kern, Burk Hufnagel, Cody Sand, David Paccoud, Fabrizio Cucci, Jaume Valls, Kariem Ali, Kent R. Spillner, Mark Elston, Michele Mauro, Nick McGinness, Robert Walsh, Steven Oxley, Ursin Stauss, and William E. Wheeler.

about this book

RxJava for Android is the book I wish I had when I started using the reactive paradigms on Android. RxJava is an incredibly powerful tool, and you will learn how to use it in a way that creates robust and sustainable code. You will understand the change of mental models compared to more traditional ways of programming and what that brings you.

who should read this book

Reactive programming has become a tool that is used at least in some part of almost every Android application—and if not RxJava, then another reactive library. It is helpful for every Android developer to have a little deeper knowledge of reactive programming in case they encounter it.

You should have basic experience with the Android platform to get most out of this book, though you could also learn the basics of the platform from the samples as you go. Just keep in mind that with RxJava, you would do some things differently than on the vanilla Android, which is the whole point of this book!

how this book is organized: a roadmap

You’ll find this book divided into three parts. Part 1 introduces RxJava and lets you become familiar with the basics of using it on the Android platform.

  • Chapter 1 shows a quick win for RxJava in asynchronous event handling with the debounce operator.

  • Chapter 2 explores using RxJava for the basic networking needs of an Android app.

  • Chapter 3 outlines the difference between events and changing state and introduces data processing chains.

  • Chapter 4 shows you how to build a Flickr client by combining what you have learned so far.

  • Chapter 5 dives into custom observables and how to do efficient multithreading with RxJava by building a fully functioning file explorer app.

Part 2 is focused around view models and how to use them to refine your data streams.

  • Chapter 6 expands the file explorer app and improves the architecture by separating part of the business logic into a view model.

  • Chapter 7 further develops the file explorer app to add a model as the single source of data.

  • Chapter 8 explains the connection between a view and a view model with an example app of tic-tac-toe.

  • Chapter 9 adds a persisting model to the tic-tac-toe app.

  • Chapter 10 shows how you can unit test RxJava code and to add a few tests to the tic-tac- toe app as an illustration.

    Part 3 takes a deep dive to more advanced examples of how RxJava can be used to architect your application.

  • Chapter 11 uses WebSockets with RxJava to build a live chat client app.

  • Chapter 12 adds a model to the chat client app to load existing messages and support messages that have not yet gone out.

  • Chapter 13 uses RxJava to create dynamic animations that promptly react to user interaction.

  • Chapter 14 finishes the book with an app that uses open source map tiles to create a draggable and zoomable map fully in RxJava.

    about the code

    This book contains many examples of source code in line with normal text. The source code is formatted in a fixed-width font like this to separate it from ordinary text.

    In many cases, the original source code has been reformatted; we’ve added line breaks and reworked indentation to accommodate the available page space in the book. Additionally, comments in the source code have often been removed from the listings when the code
    is described in the text. Code annotations accompany many of the listings, highlighting important concepts.

    All of the chapters of this book have full Android code examples online. The examples range from simple demos to more rounded apps.

    The code for this book is available for download from the Manning website at https://www .manning.com/books/rxjava-for-android-developers and from GitHub at https://github .com/tehmou/RxJava-for-Android-Developers. 

No comments:

Post a Comment