First, brief
For many developers today, functional response programming has become an essential way to compute-oriented abstraction, which describes a job search for expressions, and response programming is a data-flow programming paradigm that is related to the updating of data, The combination of thinking and responsive programming in functional programming is a function-responsive programming, and we step into the inner part of the function-responsive programming. Before understanding Rxjava, we should know what Rx is,rxjava is reactivex Java implementation, Microsoft defines RX as a function library that allows developers to write asynchronous and event-based programs using observable sequences and LINQ -style query operators, and developers can leverage observables To represent the concurrent processing of asynchronous data streams, querying asynchronous streams with LINQ style query operators, and schedulers parameterized asynchronous data streams; Rxjava asynchronous operations are implemented through the observer pattern, and Rxjava has four roles, respectively Observable,Observer,Subscribler,suject, observable, and observer implement subscription relationships through Subscribler , the observable can notify the observer when needed;
second, the basic use of Rxjava
Before using, configure the Androidstudio Gradle
dependencies {
...
.. Compile ' io.reactivex.rxjava2:rxjavafx:2.2.0 '
compile ' io.reactivex:rxandroid:1.2.1 '
}