NoRxJava : Everything about Rxjava
Thinking like a Rxjava library creator,Why we need use RxJava...I will tell you everything about Rxjava:RxJava Study Resources(Part1)、Rxjava Usage(Part2) and Interpretation of Rxjava Source Code(Part3)...
Where to find RxJava:
- RxJava1.x: https://github.com/ReactiveX/RxJava
- RxJava2.0: https://github.com/ReactiveX/RxJava/tree/2.x
- RxAndroid: https://github.com/ReactiveX/RxAndroid
- Retrolambda: https://github.com/orfjackal/retrolambda
- RxBinding: https://github.com/JakeWharton/RxBinding
- RxJavaFX: https://github.com/ReactiveX/RxJavaFX
- RxNetty: https://github.com/ReactiveX/RxNetty
- RxKotlin: https://github.com/ReactiveX/RxKotlin
- RxJavaAsyncUtil: https://github.com/ReactiveX/RxJavaAsyncUtil
- RxJavaDebug: https://github.com/ReactiveX/RxJavaDebug
- RxApacheHttp: https://github.com/ReactiveX/RxApacheHttp
- RxJavaString: https://github.com/ReactiveX/RxJavaString
- RxJavaFileUtils: https://github.com/ReactiveX/RxJavaFileUtils
- RxJavaMath: https://github.com/ReactiveX/RxJavaMath
Version 2.x and 1.x will live side-by-side for several years. They will have different namespaces (io.reactivex vs rx).
The purpose for 2.x is:
- leverage Java 8+ features
- Reactive Streams compatibility
- performance gains through design changes learned through the 1.x cycle
- Zero Dependencies
- < 800KB Jar
- Java 6+ & Android 2.3+
- Java 8 lambda support
- Polyglot (Scala, Groovy, Clojure and Kotlin)
- Non-opinionated about source of concurrency (threads, pools, event loops, fibers, actors, etc)
- Async or synchronous execution
- Virtual time and schedulers for parameterized concurrency
Learn more about RxJava on the Wiki Home.
Where to find Google's Reactive Programming for Android:
Part1 RxJava Study Resources:
3.Grokking RxJava, Part 1: The Basics:RxJava is the new hotness amongst Android developers these days. The only problem is that it can be difficult to approach initially. Functional Reactive Programming is hard when you come from an imperative world, but once you understand it, it's so awesome!I'm here to try to give you a flavor of RxJava. The goal of this three four-part series is to get your foot in the door. I'm not going to try to explain everything (nor could I). I just want you to become interested in RxJava and how it works.(Chinese translation:深入浅出RxJava（一：基础篇）)
4.给 Android 开发者的 RxJava 详解:Introduce Rxjava To Chinese Android developer.
5.RxAndroid And Kotlin (Part 1):I started with RxAndroid about a week ago. At first, I didn’t really get it… I mean, I grasped the concept but I didn’t understand where I should be using it. But then after going through a few examples and a few really good articles (links at the end)… I just got it!
6.REPLACE ASYNCTASK AND ASYNCTASKLOADER WITH RX.OBSERVABLE – RXJAVA ANDROID PATTERNS:I'd like to explore some patterns that have emerged as I've worked on various projects that rely on RxJava as the primary backbone of the architecture.There are plenty of “Getting Started” type posts talking about RxJava, some of which are in the context of Android. But at this point, I imagine there are people out there who like what they hear so far but aren't really sure how or why to to use it when solving concrete problems in their Android projects.(Chinese translation:用RxJava.Observable取代AsyncTask和AsyncTaskLoader-RxJava Android模版)
7.When the Avengers meet Dagger2, RxJava and Retrofit in a clean way:Recently, a lot articles, frameworks, and talks at the android community, are appearing talking about testing and software architecture, as said in the last Droidcon Spain, we are focusing on how to do robust applications instead on how to develop specific features. That denotes that the Android framework and the current Android commnunity is reaching some level of maturity.(Chinese translation:当复仇者联盟遇上Dragger2、RxJava和Retrofit的巧妙结合)
9. Don't break the chain: use RxJava's compose() operator:What if you have a set of operators that you want to reuse for multiple streams? For example, I frequently use subscribeOn() and observeOn() because I want to process data in a worker thread then subscribe to it on the main thread. It'd be great if I could apply this logic to all my streams in a consistent, reusable manner.(Chinese translation:避免打断链式结构：使用.compose( )操作符)
10.Error handling in RxJava:xJava makes error handling a snap. Just use onError, right?That's fine and dandy if you're the subscriber, but what about exceptions that occur inside your operators? How do you ensure that an Exception in, say, flatMap() gets passed along to onError? And what if you don't want the exception to terminate the sequence?
11.How to upgrade to RxAndroid 1.0:A number of people have asked me recently, "What the hell happened to RxAndroid?"The fact of the matter is, RxAndroid was getting to be a bit of a mess and thus has been majorly refactored. You can read more about it here, but essentially:I am proposing a from-scratch, modularization of the library into re-usable and composeable modules.That has been accomplished, but if you upgrade now you're probably wondering: where did everything go and how can I get my code compiling again?
12.Deferring Observable code until subscription in RxJava:I've grown fond of RxJava's defer() as a tool for ensuring Observable code runs when subscribed (rather than when created). I've written about defer() before but I'd like to go into more detail here.
13.Loading data from multiple sources with RxJava:Suppose I have some Data that I query from the network. I could simply hit the network each time I need the data, but caching the data on disk and in memory would be much more efficient.(Chinese translation:使用RxJava从多个数据源获取数据)
14.Grokking RxJava, Part 2: Operator, Operator:In part 1 I went over the basic structure of RxJava, as well as introducing you to the map() operator. However, I can understand if you're still not compelled to use RxJava - you don't have much to work with yet. But that will change quickly - a big part of the power of RxJava is in all of the operators included in the framework.Let's go through an example to introduce you to more operators.(Chinese translation:深入浅出RxJava(二：操作符))
15.Grokking RxJava, Part 3: Reactive with Benefits:In part 1, I went over the basic structure of RxJava. In part 2, I showed you how powerful operators could be. But maybe you're still not sold; there isn't quite enough there yet to convince you. Here's some of the other benefits that come along with the RxJava framework which should seal the deal.(Chinese translation:深入浅出RxJava三--响应式的好处)
16.Grokking RxJava, Part 4: Reactive Android:In parts 1, 2, and 3 I covered how RxJava works (in a general sense). But as an Android developer, how do you make it work for you? Here is some practical information for Android developers.RxAndroid is an extension to RxJava built just for Android. It includes special bindings that will make your life easier.(Chinese translation:深入浅出RxJava四-在Android中使用响应式编程)
17.Using RxJava with Android:This post is the first in a series about RxJava and Android. This tutorial will show you how to build a REST API client in Android with RxJava observables (and based on Square’s Retrofit).If you’re into Android (and Java) development, there is a good chance you’ve already heard about RxJava, which is a Java implementation of Reactive Extensions developed by Netflix. Reactive Extensions is a library to compose asynchronous and event-based programs using observable collections and LINQ-style query operators, quoted from the corresponding MSDN site. Netflix made the library available for the public on Github, supporting Java 6 or newer, making it available to use with Android apps as well.(Chinese translation:在安卓上使用RxJava)
19.RxJava Observable tranformation: concatMap() vs flatMap():After a while I decided that was time to get back for some writing. As you may know at @SoundCloud we do a strong use of the reactive approach, but to be honest, I am not here to talk about RxJava itself because there are great articles out there to read about it (here and here) and great people to follow as well such as Ben Christesen, Matthias Käppler and many others.I also consider myself a ‘newbie’ in reactive programming and now I am at that stage where you start seeing the benefits of this approach and want to make every single object reactive, which is very dangerous, so if you are in the same level as me, just keep an eye on it, and use it wherever makes sense, you are advised.(Chinese translation:RxJava变换操作符：.concatMap( )与.flatMap( )的比较)
20.Debugging RxJava on Android:Debugging is the process of finding and resolving bugs or defects that prevent correct operation of computer software (Wikipedia).Nowadays debugging is not an easy task, specially with all the complexity around current systems: Android is not an exception to this rule and since we are dealing with asynchronous executions, that becomes way harder.As you might know, at @SoundCloud, we are heavily using RxJava as one of our core components for Android Development, so in this article I am gonna walk you through the way we debug Rx Observables and Subscribers.
21.Observe on the correct thread:Although people understand the logic of RxJava there is still a lot of confusion in which thread you should run the observable’s chain and its operators.First of all let’s clear out what’s the difference between .subsribeOn() and .observeOn() in RxJava.(Chinese translation:在正确的线程上观察)
22.Improving UX with RxJava:In a perfect mobile world users would never lose connectivity, servers will never return errors and bacon would have been low fat.Building a great app experience is usually a bliss for a user but pain for the developer. Gone are the days that a user clicks a button, the UI gets blocked and you wait for a backend response. It’s just frustrating.(Chinese translation:使用RxJava 提升用户体验).Demo：https://github.com/hanks-zyh/RxSerach.
23.Party tricks with RxJava, RxAndroid & Retrolambda:“Users expect real time data. They want their tweets now. Their order confirmed now”. As a developer, you demand fire-and-forget messaging. You really don’t want to be blocked waiting for a result… You want to have the result pushed to you when it is ready, whenever that is. Even better, when working with big result sets, you want to receive individual results as they are ready because you don’t want to wait for the entire set to be processed before you see the first item on that list. Developers have lots of tools to push data, that’s easy. Developers need tools to react to pushed data.
25.Unit Testing RxJava Observables:RxJava is a great library, but it’s not easy to get started. Here we outline different approaches to unit test Observables.
26.Why should we use RxJava on Android:Reactive Extensions (Rx) are a set of interfaces and methods which provide a way to developers solve problems rapidly, simply to maintain, and easy to understand. RxJava provides just that, a set of tools to help you write clean and simpler code.To be honest with you, at first I thought RxJava was just way to difficult to understand and the ideia to add a library just to use these new tools was very troubling for me. After awhile, I understood that I was struggling by doing the same boilerplate implementation over and over again to keep the user updated on what is going on the application.
27.RX Java and Recursion:Recently I had what seemed like a tricky problem. I was using akka and wanted to make an http call within the method handling a message. When the http call completed, I wanted the actor to send a message back to the original sender actor. As I was using akka I needed to make the http call asynchronously so as not to block the thread. Seems straight forward enough if I use something like ReactiveX. I can use an async http client and convert a future into an observable. I can then subscribe to that observable, handle the http response, and send a message back to the sender. All lovely and non-blocking.
28.Android app development using the reactive programming paradigm (RxJava):If you have already looked into the likes of RxJava and other ReactiveX libraries; you are likely to agree when I say that reactive programming has a steep learning curve, this learning experience is further impeded by the fact that there aren’t many good tutorials or books on this concept.
29.A simple event bus with RxJava:Often I’m trying to avoid additional dependencies, especially if I only a need a fraction of the functionality provided by it. Every dependency makes you… well… dependent on the library and its future development, which you can’t always have influence on. Or the project will be abandoned completely and you start hacking around the source to make it work, because replacing it completely would be really time consuming and challenging. After reading this article I decided to roll my own!
30.RxJAVA, Part 1 : 기초:안드로이드 개발자들에게서 RxJava가 새로 부상하고 있다. RxJava의 유일한 문제는 진입장벽이 높다는 것이다. 만일 당신이 명령형 프로그래밍의 세상에서 왔다면 함수적 반응 프로그래밍(Functional Reactive Programming)은 어려울 것이다. 하지만 단 한 번만 이해한다면 이것이 최고임을 알 게 될 것이다.여기서는 RxJava의 맛만을 보여주려고 한다. 이 연재의 목표는 문에 발을 딛게 하는 것이다. 모든 것을 설명하려고 하지 않을 것이다(그렇게 할 수도 없다.). 나는 그저 당신이 RxJava와 그 동작에 대해 관심을 가지게 하고 싶을 뿐이다.
31.RxJava: Unit Testing Examples:After my initial foray, I wondered about unit testing RxJava. So here are a couple of examples.Lets say you have queried an API and have a model which contains an array of country names. A requirement is that the UI does not show any name which is mythical, “Atlantis” for example.
32.Introducing Yahnac: Where RxJava Meets Firebase and Content Providers:What’s Yahnac you might ask? Yet another Hacker News client, because there are never enough Hacker News clients out there!For those who don’t know, Hacker News is a social news website focusing on computer science and entrepreneurship and it is run by the startup incubator Y Combinator. In general, content that can be submitted is defined as “anything that gratifies one’s intellectual curiosity”.
33.RxJava: Android MVVM App structure with Retrofit:Creating an App structure for Android which is easy to maintain and debug is not always easy. The more Network communications and interaction between Views the app contains, the more difficult it will be.One of the things I really appreciate about a good structure is when you have a defect in your app and you know exactly where to go to fix it.
34.Easily test your one-off async operations on Android with Dagger2 and RxJava:This demo application utilizes RxJava, Dagger2, and JUnit. Explaining these libraries is out of scope for this article, but the internet has plenty of content on those topics, so check them out before continuing on. This also assumes you are familiar with the basics of JUnit testing.
35.RxJava Wiki — Introduction:RxJava는 Reactive Extensions의 Java VM 버전 구현이다. Observable sequences를 이용하여 비동기 프로그램과 이벤트-기반 프로그램을 구성하기 위한 라이브러리이다.선언적으로 모든 것이 연속되어 일어나게 조립할 수 있도록 해주는 operator들을 추가하고 데이터/이벤트 sequences를 지원하기 위해 옵저버 패턴을 확장하였다. 그러면서 추상화를 통해 low-level threading, synchronization, thread-safety, concurrent data structures, and non-blocking I/O같은 것들에 대한 걱정은 하지 않도록 하였다.RxJava는 Groovy, Clojure, JRuby, Kotlin 그리고 Scala같은 Java 6 또는 그 이상의 JVM-기반 언어를 지원한다.
36.Simple way to test asynchronous actions in Android: Service, AsyncTask, Thread, RxJava etc.:Sometimes testing asynchronous actions might be very difficult but in most common cases during Android development it might be done with a very simple technique.If you know basics of concurrency you can test asynchronous operations with a simple wait/notify.
37.RxJava 短期效用:一個 FRP 的實現，透過 FRP(Functional Reactive Programming) 概念。短期效用：有效避免巢狀 callback 增加可讀性以及減少 List
38.Legal from State to State:Avoiding IllegalStateExceptions using RxJava and RxLifecycle.
39.Reactive Streams 1.0.0 interview:On the heels of the release of Reactive Streams 1.0.0, I decided to grab a couple of engineers — Ben Christensen of RxJava and Netflix fame, Stephane Maldini of Pivotal’s Project Reactor and the inimitable Dr. Roland Kuhn of the Akka Project at Typesafe — that have been engaged in the project, to ask them a couple of quick questions about Reactive Streams, their involvement, and what the future has in store for Reactive Streams.
40.Taking Command of Android Development:Throughout my Android career, I’ve often been asked to complete what sounds like a simple task:Get information from a server to a UI.
41.Reactive Android Form. The recipe:Everyone hates forms, but there is a type of people that hates them even more… Developers. We are all tired of these long forms and handling all the possible cases, all the errors and then make everything smoothly and easy for the user. I don’t have the perfect solution, but I have a way to make it easier and let me say even better. Let’s call it RxForms.
42.Why you should be doing Functional Reactive Programming:stages of learning reactive programming: - denial - anger - bargaining - acceptance - flatMap the shit out of it.Let me start by saying that Functional Reactive Programming is hard when you come from an imperative mindset, but once you overcome the steep learning curve, it can save time, make for a cleaner, more robust, and maintainable code base.
43.RxFlux Android Architecture:This is the first article about the new RxFlux framework. Is small light-weight framework that makes it easy to follow the Flux pattern with RxJava functionalities.I will not get into the details on how Flux works, in order to understand more how to use Flux pattern in Android, @lgvalle created a nice example and explanation. I would recommend to read it before.In this article I will explain how to create an app from scratch using RxFlux. If you want to see more specific details in how to use RxFlux, go to the repo. One last note is that I used Retrolambda because everything looks much clear with it.
44.Android RxJava使用介绍(一)Hello World:RxJava最核心的两个东西就是Observables(被观察者，也就是事件源)和Subscribers(观察者)，由Observables发出一系列的事件，Subscribers进行订阅接收并进行处理，看起来就好像是设计模式中的观察者模式，但是跟观察者模式不同的地方就在于，如果没有观察者(即Subscribers)，Observables是不会发出任何事件的。
46.Implementing an Event Bus With RxJava - RxBus:“RxBus” is not going to be a library. Implementing an event bus with RxJava is so ridiculously easy that it doesn’t warrant the bloat of an independent library.
47.Website: http://rxmarbles.com/:Interactive diagrams of Rx Observables.
48.Functional Reactive Programming on Android With RxJava:In the domain of mobile or desktop applications, parallel execution allows for responsive user interfaces because we can move computations into the background while the UI responds to ongoing user interactions. Code must execute concurrently to not stray from this fundamental requirement. Writing such programs is diffcult because on mobile they are typically written in imperative languages like C or Java. Writing concurrent code in imperative languages is difficult because code is written in terms of interweaved, temporal instructions that move objects or data structures from one state to another. This imperative style of programming inherently produces side effects. It presents several problems when running instructions in parallel, such as race conditions when writing to a shared resource.
49.Monads: Your App as a Function, Part 1:I write Android applications, and Java is not a functional language. It’s not even an object-oriented language, at least not in a puristic sense. However, that doesn’t stop us from adopting some of the good practices found in FP to improve on existing Java code. In this post I’ll try to explain how adopting one of the most fundamental type patterns in FP, monadic types, can dramatically simplify and improve the robustness of your core application logic.I have already written about RxJava and functional reactive programming and how we make use of it in our mobile applications at SoundCloud.
50.Monads: Your App as a Function, Part 2:Let me begin by saying that there is no deeper meaning in these laws beyond supporting common sense. I still think it’s worth looking at them because they close the loop to imperative programming, which you might be more familiar with, since especially the second and third laws enable what’s been attributed to monads as being “programmable semicolons” in case you’ve stumbled upon that phrase before.
51.RxAndroid and Retrofit 2.0:Ok, so this isn’t new or anything, but I thought let’s just make a simple tutorial with the new Retrofit 2.0, that should give you (and me) a starting point.This isn’t a tutorial for RxAndroid, so if you don’t know much about it, you should first check out this..
52.Crunching RxAndroid — Part 5:In the last episode, we saw that even with the help of Reactive Programming, we risk to leak some important (and heavy) parts of our app, thus wasting users’ resources. They won’t be happy. We won’t be happy as a consequence, so let’s fix this!
53.Why RxFlux?:I realized that my previous post showing a real example of an app using RxFlux was quite extensive.I decided to do a pre-introduction, where I will try to convince you why you should use it or at least read more about it.First of all RxFlux comes from the combination of RxJava and Flux pattern. If you don’t know the advantages of RxJava, just google it, you will find thousands of posts about it. On the other side, Flux is a known pattern in different platforms that recently popped up in the Android World.
54.Droidcon 2015 London (Part 1):It was a blast. In these blog post series, I am putting brief of all talks I’ve attended in Droidcon 2015 London (will add links to videos when they are uploaded). It’s a summary and a reference point to things I’ve learned (and actually force myself to look deeper). Also, I am adding awesome #sketchnotes made by @corey_latislaw (my own are not very pretty xD). And some photos from a social feed. Part 2.
55.Back in Krakow for the Droidcon:After almost ten years, I was in Poland again last week. Ten years ago I was an Erasmus student; last week I was a speaker at Droidcon Krakow!Every Droidcon feels like a family reunion to me, but the funny part is that the family is continuously growing in size, every time we meet.Droidcon Krakow venue was a hotel and turns out that’s just brilliant: everything is already there, organised, comfortable. The food was really good and those “always-on” buffets were delicious. I stayed in the same hotel and this made the logistics as smooth as possible.
56.Reactive Programming in the Netflix API with RxJava:Our recent post on optimizing the Netflix API introduced how our web service endpoints are implemented using a reactive programming model for composition of asynchronous callbacks from our service layer.This post takes a closer look at how and why we use the reactive model and introduces our open source project RxJava – a Java implementation of Rx (Reactive Extensions).
58.Top 7 Tips for RxJava on Android:Last November I found myself at Futurice in London starting a challenging project that seemed to be the perfect candidate for a more immersive reactive system. We made the bold decision to build the entire Android architecture in RxJava. Little did we know at that time, though, just how deep the dive would be. After a few initial encouraging experiments we were surrounded by eerie problems and sleepless nights. Some usual solutions became impossible as they did not play with the system. Instead of null pointer exceptions we were debugging threading issues. Stack Overflow became even less relevant than usually. Curiously enough, there was no desire to turn back. It was clear the reactive way was the right way and anything else would have felt but an ugly compromise. That is, in fact, the funny thing about reactive — no matter how hard it is in the beginning, it always feels it is worth it. Fast-forward a few months, and we have an app with dense but clean code and an usually good test coverage of critical domain logic.
59.Advanced RxJava:In this final part, I'm going to show how one can implement operators (source and transformative alike). Since the Completable API features no values but only the terminal onError and onCompleted events, there are a way less meaningful operators possible unlike the main Observable class; therefore, most of the examples will feature an existing Completable operator.
61.ReactiveX란 무엇인가?:ReactiveX는 Observer 패턴과, Iterator 패턴, 함수형 프로그래밍의 특성을 이용하여 비동기 구성과 관측 가능한 데이터 스트림 또는 이벤트 스트림을 다루는데 초점을 맞춘 API이다. 실시간 데이터를 다루는것은 빈번하게 발생하며, 실시간 데이터를 다루기 위해 효율적이고, 명확하며, 확장가능한 접근법을 가지는 것은 중요하다. 실시간 데이터를 다루기 위해 Observables와 operator를 사용하여, ReactiveX는 쓰레드 생성과 동시성 문제와 같은 비동기 프래그래밍의 일반적인 관심사를 단순화 하면서 데이터 스트림의 생성과 작용을 위한 구성 가능하고 유연한 API를 제공한다.
62.The Simplest RxJava Observable Sample App:The RxJava Observable pattern in Android Development is excellent for handling multiple complex tasks and allowing control of how processes and data are handled. It’s hard to say if this is going to be a best practice or just this year’s trend, however it does seem to have current benefits.
63.Testing Rx code:In our app we strongly rely on Reactive Programming approach. Almost all async calls are handled by RxJava (the only exception is database which still works very well with old-fashioned Cursor, LoaderManager and Content Provider set). With a great possibilities given by reactive extension there is one issue — call chains, especially those which are passed between different threads by observeOn() and subscribeOn() operators, make testing problematic. In more complex solutions with IO or Computation schedulers simple using toBlocking() call doesn’t work — test is literally blocked during method execution.
64.RxJava on the Sign In Screen:Before I dive into an example of using RxJava, I’d like to talk a little bit about my journey trying to grok RxJava. What exactly is this thing called RxJava?RxJava is a Java VM implementation of ReactiveX (Reactive Extensions): a library for composing asynchronous and event-based programs by using observable sequences.
65.Async Injection in Dagger 2 with RxJava:A couple weeks ago I wrote a post about asynchronous dependency injection in Dagger 2 with Producers. Objects initialization execution on background thread(s) has one great advantage — it doesn’t block main thread which is responsible for drawing UI in real-time (60 frames per second for keeping smooth interface).
66.Using HandlerScheduler from RxAndroid:Working in different threads in android became more easily in RxJava. Developers using RxJava don’t need to worry (in most cases) about thread executions in background or parallel. Simply put a magical subscribeOn and observeOn(AndroidSchedulers.mainThread()) and everything works fine. But there is the HandlerScheduler in RxAndroid, so… how and when do I need use it?
67.Crunching RxAndroid — Part 8:In the previous part of this series, we dissected a little bit of the core RxJava framework, with the idea of learning the most we could about the mechanics of the reactive programming on Android and how to create and use custom operators. This time, we will start talking about a very important — yet very hard to catch — element of the famous library, trying to understand where we can use this new component and where we do not need it.
68.2 minute introduction to Rx:You've probably seen this tutorial I wrote some time ago. Too long? Alright. Rx is not that hard, you could have invented it yourself. Keep reading.
69.Howdy RxJava:During my research on Reactive Programming, almost every article I’ve found, begins with the notion that it is difficult to learn. Finding articles focused on people with zero or little knowledge of reactive programming has been difficult. This article attempts to demystify the fundamentals of reactive programming for newcomers — using RxJava on android.
69.Converting callback async calls to RxJava:Since we started using RxJava in our Yammer Android app we’ve often encountered APIs that don’t follow its reactive model, requiring us to do some conversion work to integrate them with the rest of our RxJava Observable chains.
70.【RxJava && Agera】从源码简要分析基本调用流程:相信很多做Android或是Java研发的同学对RxJava应该都早有耳闻了，尤其是在Android开发的圈子里，RxJava渐渐开始广为流行。同样有很多同学已经开始在自己的项目中使用RxJava。它能够帮助我们在处理异步事件时能够省去那些复杂而繁琐的代码，尤其是当某些场景逻辑中回调中嵌入回调时，使用RxJava依旧能够让我们的代码保持极高的可读性与简洁性。不仅如此，这种基于异步数据流概念的编程模式事实上同样也能广泛运用在移动端这种包括网络调用、用户触摸输入和系统弹框等在内的多种响应驱动的场景。那么现在，就让我们一起分析一下RxJava的响应流程吧.
71.use Rxjava instead of Event Bus libraries:In Android community, everyone is talking about RxJava and why we should use RxJava in Android projects. After start implementing RxJava in our Android application, we noticed that we don’t need Otto(or any other event bus libraries) implemented in our code base. In this blog post, I am going to show how we got rid of Otto in our code base, start using RxJava instead.
72.Migrating from RxJava 1.0 to RxJava 2.0 and Learn RxJava by Examples:This article will help you learn RxJava 2.0 by example. It will also show you how to migrate from RxJava 1.0.If you are just getting starting with RxJava, here’s a sample project to learn it with examples. You can dive right in, build the project, and start learning.
73.RxJava as event bus, the right way:Otto from Square got officially deprecated the previous days. In the Android world we can cheer now something like “EventBusses are dead long live RxJava”.The raising question though is how can you efficiently migrate from an existing event bus such as Otto or Greenbot’s EventBus to Rx, or sometimes known as RxBus.Before we talk about RxJava as a event bus let’s be sure that one understands the functionality of an event bus.
74.Let the view handle the lifecycle in MVP by using RxJava:Suppose that your view has a method called showProducts. Simply, it updates the items of recyclerview. If your view is a Fragment, you have to call this method after onViewCreated to be make sure the view is inflated.If we let the presenter know when onViewCreated is called, it can call showProducts on right time. But handling the view’s lifecycle is not the presenter’s job. View should handle that. But how?
75.RxJava2: An Early Preview:As an avid RxJava user I’ve been following the development of RxJava2 which just hit its first Release Candidate. Here are some of the most interesting updates and additions to the library and what they mean for the developer community.
76.Android animations powered by RxJava:Animating objects in Android is seemingly easy, especially using ViewPropertyAnimator which provides out-of-the-box solutions and easy-to-construct view property animations. Add RxJava to the mix and you have a very powerful tool for chaining animations with other animations, random actions, etc.
77.RxJava’s Side Effect Methods:RxJava’s Observable class has plenty of methods that can be used to transform the stream of emitted items to the kind of data that you need. Those methods are at the very core of RxJava and form a big part of it’s attraction.But there are other methods, that do not change the stream of items in any way – I call those methods side effect methods.
78.What's different in 2.0:RxJava 2.0 has been completely rewritten from scratch on top of the Reactive-Streams specification. The specification itself has evolved out of RxJava 1.x and provides a common baseline for reactive systems and libraries.Because Reactive-Streams has a different architecture, it mandates changes to some well known RxJava types. This wiki page attempts to summarize what has changed and describes how to rewrite 1.x code into 2.x code.
79.Testing asynchronous RxJava code using Mockito:RxJava is used in many Android applications to manage background tasks, in this post will see how to test this code using Mockito and some RxJava utility classes. The example is written using RxJava 2, the same concepts are available also in RxJava 1 (in the demo project you can find both versions of the same example).
80.RxAndroid Tutorial:Reactive programming is not just another API. It’s a whole new paradigm and a very useful one. RxJava is a reactive implementation used on Android. Android is a perfect place to start your exploration of the reactive world. It’s made even easier with RxAndroid, a library that wraps asynchronous UI events to be more RxJava like.
81.Practical challenges for RxJava learners:RxJava is a valuable part of Java developer toolset and #1 language improvement framework for Android developers. Many of us want to learn it better, read some blogs and sources, but often miss practice to consolidate collected knowledge. Below I suggest a way to challenge yourself with coding tasks and improve practical RxJava skills.
82.Testing RxJava2:You’ve read about RxJava; you’ve played with the samples on the internet, for example in RxJava by Example, and now you have made a commitment to explore reactive opportunities in your own code. But now you are wondering how to test out the new capabilities that you might find in your codebase.Reactive programming requires a shift in how to reason about a particular problem, because we need to focus not on individual data items but on data flowing as streams of events. These events are often produced and consumed from different threads, and so when writing tests we must keep aware of concurrency concerns. Fortunately RxJava2 provides built-in support for testing Observables and Disposables, built right into the core rxjava dependency.
83.关于 RxJava 最友好的文章—— RxJava 2.0 全新来袭:之前写RxJava相关文章的时候，就有人想让我谈谈RxJava2.0的新特性，说实话，一开始我是拒绝的。因为在我看来，RxJava2.0虽然是版本的重大升级，但总归还是RxJava，升级一个版本还能上天是咋的？了解一下它的更新文档不就好了么？真的有必要单出一篇文章来谈这个么?但是详细的了解了RxJava2.0以及部分源码之后，我觉得还是有必要对RxJava2.0做一个说明，帮助大家对于RxJava有更好的认识。
84.Clearer RxJava intentions with Single and Completable:In almost all RxJava example code and tutorials there is one class that reigns supreme — the Observable. It is the object which makes the whole magic of reactive programming possible. It’s simple — you only have to track 3 events — onNext, onError, and onCompleted and you can apply all of the hundreds of possible operators to make it do your bidding. Why would you need anything else, right?
1.Get Reactive by Wolfram Rittmeyer/Pascal Welsch:The RxJava hype is still in full swing and almost everything gets Rxified. At least since the stable RxAndroid 1.0 release it’s time to take RxAndroid seriously!In this session you will learn what RxJava is about, how to use it on Android and how RxAndroid can be used to build maintainable Android Apps from networking with Retrofit2 to UI with the new RxBinding and RxLifecycle libraries powered by MVP.If you haven’t had the time to Get Reactive, we’ll provide a quick introduction why you should use RxAndroid in your current and next projects.Code: https://github.com/passsy/android-GetReactive.Slides: https://speakerdeck.com/passsy/get-reactive-devoxx.
2.Learning RxJava (for Android) by example:A presentation aimed at beginners who have heard about RxJava and want to see what all the fuss is about. Kaushik Gopal provides primers on RxJava and RxAndroid, then looks at implementing real-world use cases in Android with RxJava.
3.Devnexus 2015 - RxJava and Retrolambda Making Android - Ross Hambrick:Devnexus 2015 - RxJava and Retrolambda Making Android - Ross Hambrick.
4.#droidconDE 2015: Ivan Morgillo – Android reactive programming with Rxjava:In a world where there is a smartphone in every pocket, designing and building applications that can run smoothly and provide the User Experience that users will like it’s the only way to go. Reactive Programming style with RxJava will help you to beat Android Platform limitations to create astonishing Android Apps.This talk will be a practical journey from basic Reactive Programming and Observer Pattern concepts to the main feature of RxJava, with practical code examples and a real-world app.Find more information here: http://15.droidcon.de/session/android...
5.Jake Wharton: Reactive Extensions, RxAndroid, Optimization:Before Droidcon NYC 2015, Huyen tries to pick Jake Wharton's brain on Reactive Extensions, RxAndroid, and optimization.
6.Droidcon NYC 2015 - Introduction to Functional Reactive Programming:Juan Gomez-Netflix:Introduction to Functional Reactive Programming.http://droidcon.nyc/2015/dcnyc/33/
8.React 2014 : Erik Meijer - What does it mean to be Reactive?:The inimitable Erik Meijer delivering his opening keynote to React 2014.
9.Functional Reactive Programming with RxJava:RxJava is a library for composing asynchronous and event-based programs by using observable sequences for the Java VM. It supports Java 6+, Clojure, Scala, Groovy, JRuby, and Java 8 lambdas. In this session, learn how the Netflix API uses RxJava (techblog.netflix.com/2013/02/rxjava-netflix-api.html) to implement highly concurrent Web services against asynchronous datasources without blocking, synchronization, or thread safety concerns by using declarative functional reactive composition. Come see what functional reactive programming looks like, how it fits into Java, and what use cases it addresses.
10.Java 8 Stream and RxJava comparison: patterns and performances by José Paumard:The Stream API is among the most important API introduced in the JDK 8. New patterns have been introduced, enabling new ways to process data, especially in parallel. The Java 8 Stream API is not alone on this segment. We would like to present here RxJava, a popular API, brought by Netflix. The patterns offered by this API are quite different from the Stream API. This presentation compares those two APIs, from the developer point of view. What patterns are proposed on both sides, and what are the performances of those patterns. Many examples and benchmarks (using JMH) are shown. The goal is not to state which one of those APIs is the best, but merely give keys to decide which one is the best suited for my application.
11.A Playful Introduction to Rx by Erik Meijer:Learning Rx does not have to be boring like working your way through theoretical sermons about esoteric concepts like category theory and duality. Life is too short for that kind of abstract nonsense. So what is a better way to spend a hot summer day with an ice-cold drink, or a cold winter night with a piping hot drink, than to learn Rx by writing an awesome platform game? In this talk, Erik will walk you through many of the features of Rx through programming a friendly bug to run across a lushy grassy meadow and jump for the stars.
12.Learn you some Rx for the greater good:What is this Rx thing that everybody keeps talking about? How am I supposed to learn it? Is it even worth my effort? Watch, learn and try Functional Reactive Programming with RxJava on Android platform “For The Greater Good”.
13.RxJava Tutorial 01 - download, setup, & write simple app.:RxJava Tutorial 01 - download, setup, & test-run by writing a simple app. . website + download source code @ http://www.zaneacademy.com
14.Functional Reactive Programming with RxJava • Ben Christensen:ABSTRACT Rxjava is a library for composing asynchronous and event-based programs using observable sequences for the Java VM that supports Java 6+, Clojure, Scala, Groovy, JRuby and Java 8 lambdas.Learn how the Netflix API uses RxJava (http://techblog.netflix.com/2013/02/r...) to implement highly concurrent web services against asynchronous data sources without blocking, synchronization or thread-safety concerns by using declarative functional reactive composition.Come see what functional reactive programming looks like, how it fits into Java, what use cases it addresses and real-world examples of how it can become a tool in your application development.
15.Introducing RxJava into a Spring Boot REST API:RxJava is an awesome library for async data streams. It is both expressive and powerful but the learning curve can be quite steep at first. So we want to quickstart developers into the world of Reactive eXtensions with more context than just listing operators!Adapted from a hands-on workshop, this talk will describe how one can migrate code into a fully async and RxJava-based application, built upon Spring Boot and Java 8. What kind of changes does this require? What shifts in thinking? What are the traps and pitfalls to avoid? Hopefully you'll learn the answers to these questions in this talk!Slides: http://www.slideshare.net/SpringCentr...+XsoulflyX https://github.com/simonbasle/practicalRx
16.Demystifying RXJAVA Subscribers:Demystifying RXJAVA SubscribersRxJava is a powerful library for creating and composing streams of data. It can quickly be used to great effect, but a deeper understand of its internals will prevent running into pitfalls later on.This talk will focus on the core mechanism of how streams are created and observed: subscribers and subscriptions. We will start with an introduction to the contract of the Subscriber type and how it is used by sources to create streams. Then we will touch on operators and how they use subscribers to modify the data flowing through streams. Finally we'll look at how threading behaves in operators like subscribeOn and observeOn.
17.Android reactive programming with RxJava by Ivan Morgillo:In a world where there is a smartphone in every pocket, designing and building applications that can run smoothly and provide the User Experience that users will like it’s the only way to go. Reactive Programming style with RxJava will help you to beat Android Platform limitations to create astonishing Android Apps.This talk will be a practical journey from basic Reactive Programming and Observer Pattern concepts to the main feature of RxJava, with practical code examples and a real-world app.I'll show the audience how to create an Observable "from scratch", from a list or from a function we already have in our code base. Our listeners will learn how to filter an Observable sequence to create a new sequence containing only the values we want; they will learn how to apply a function to an Observable, how to concatenate, merge or zip Observables. I'll show how to enjoy RxAndroid Schedulers to overcome the threading and concurrency hell in Android.
18.RxJava Easy Wins: Breaking down Reactive Programming:Ron Shapiro, Android Developer: http://nyc.droidcon.com/2014/dcnyc/62/...Slides from https://speakerdeck.com/search?q=droi...
19.Практика использования RxJava в Я.Музыке и Я.Радио - Евгений Макар, Дмитрий Стабровски:Евгений расскажет, как здорово используется RxJava в Яндекс.Радио, а Дмитрий — как благодаря этой технологии код Яндекс.Музыки становится легче.
20.Lambdas on Android: RetroLambda, RxJava and Android Studio:In this video, I'll show you how to migrate to lambdas on Android using RetroLambda, GradleRetroLambda and Android Studio.
21.RXJava on practice, Cegeka:RXJava on practice, Cegeka.
22.RxJava Tutorial 03 - Observable from, just, & create methods:Website + download source code http://www.zaneacademy.com.
23.RxJava: Reactive Extensions in Scala:RxJava is a library for composing asynchronous and event-based programs using observable sequences for the Java VM that supports Java 6+, Clojure, Scala, Groovy, JRuby, and Java 8 lambdas.
24.Ben Christensen on Reactive Programming with RxJava (TimesOpen: Reactive Programming):Ben Christensen of Netflix Edge Engineering explains how Netflix deals with asynchronous streams of data and multiple values.
26.Retrofit y RXJava: cómo mejorar el rendimiento en Android Apps:En ese te video, Pedro Hernández, profesor del curso de Desarrollo para Android, te enseñará cómo obtener el mayor rendimiento en tus peticiones al servidor a través del uso de herramientas como RX java y Retrofit .
27.Reactive Data Acess with RxJava, Including N1QL: Couchbase Connect 2015:This talk shows how to build scalable, reactive, and fault tolerant applications by making use of RxJava and the brand new fully reactive Couchbase Java SDK 2.x. We will also cover stability patterns and how our brand new query language, “N1QL” fits into the picture. This subject is important, as applications that exclusively rely on synchronous data access often hit a scalability wall when responses slow down and thread pools are exhausted. New paradigms, like reactive programming, alleviate the wasting of resources by dispatching them where they can do useful work and provide extensive toolsets to deal with the ever growing demands of web applications.
29.Learn you some Rx for the greater good:What is this Rx thing that everybody keeps talking about? How am I supposed to learn it? Is it even worth my effort? Watch, learn and try Functional Reactive Programming with RxJava on Android platform “For The Greater Good”.
31.All Video:Learning RxJava (for Android) by exampleby Bálint Böde:A presentation aimed at beginners who have heard about RxJava and want to see what all the fuss is about. Kaushik Gopal provides primers on RxJava and RxAndroid, then looks at implementing real-world use cases in Android with RxJava.
32.All Video:Functional Reactive Programming with RxJava • Ben Christensenby matej zdolsek :This presentation was recorded at GOTO Aarhus 2013.Check out our upcoming conferences at http://gotocon.com
33.WJUG #126 - CompletableFuture i RxJava - functional reactive programming w Javie - Tomasz Nurkiewicz:WJUG #126 - CompletableFuture i RxJava - functional reactive programming w Javie - Tomasz Nurkiewicz.
34.RxJava intro:RxJava intro.
35.RxJava arhictecture:RxJava arhictecture.
36.RxJava: Functional Reactive Programming - RJUG - December 17, 2014:Richmond Java Users Group - RJUG December 17, 2014.
39.All Video:Lambdas on Android: RetroLambda, RxJava and Android Studioby bibol bolat :In this video, I'll show you how to migrate to lambdas on Android using RetroLambda, GradleRetroLambda and Android Studio.
40.All Video:Lambdas on Android: 웨비나 - RxAndroid by bs sin :RxAndroid.
41.Learning Rx by exampleby Øredev Conference.
42.Exploring RxJava 2 for Androidby Jake Wharton on Nov 30 2016.
- MovieGuide An Android app that showcases the MVP pattern and RxJava.
- Awesome-RxJava RxJava resources.
- NoRxJava Everything about Rxjava:Thinking like a Rxjava library creator,Why we need use RxJava.
- RxAndroidLibs A curated list of libraries to aid reactive development on Android.
- RxDocs Rx和RxJava文档中文翻译项目.
- RxAndroid-overview Deckset presentation about RxJava and RxAndroid.
- RxJava-Android-Samples Learning RxJava for Android by example.
- RxBinding RxJava binding APIs for Android's UI widgets.
- reark RxJava architecture library for Android.
- Meizhi ank.io unofficial client, RxJava & Retrofit.
- PhotoNoter An Android app that use MVP+Dagger2+RxJava+Dex+MaterialDesign.
- rex-weather RexWeather - A sample Android project demonstrating the use of Retrofit and RxJava to interact with web services.
- RxBus Event Bus By RxJava.
- rxjava-essentials These are the RxJava Essentials code samples modified to use the latest build tools and with minor code formatting modifications.
- RxJava-Essentials-CN RxJava Essentials for Chinese.
- Android-ReactiveLocation Small library that wraps Google Play Service API in brilliant RxJava Observables reducing boilerplate to minimum.