the application to each other. • Such that one component can correctly react to the output of its counterpart if need be. • This way, users can see real time response of their actions. • In a nutshell, an app is said to be reactive if it responds to users action(s) in real time.
from the Observer pattern, Iterator pattern and functional programming. http://reactivex.io/ • RxJava - ReactiveX for the JVM - A library for composing asynchronous and event-based programs using observable sequences for the JVM https://github.com/ReactiveX/RxJava • Observer Pattern - A software design principle in which an Object, called the subject, maintains a list of dependents, called Observers, and notify them automatically of any state changes, usually by calling one of their methods. https://en.wikipedia.org/wiki/Observer_pattern
of data. • Data emitted can range from 0 to infinity • They may or may not emit any data • Synchronously or asynchronously • Starts when you subscribe or unsubscribe • Stops either due to an error or completion
asynchronously react to emissions by Observables • They do so by “subscribing” to the observable • Then override the onNext(...), onError(...), onCompleted(...) methods • onNext() is called whenever the Observable emits data • onCompleted() is called whenever the Observable stops emitting data • onError() is called if an error occurs • onCompleted() and onError() are terminal methods • To avoid memory leaks, ensure you unsubscribe after a complete transaction • This is best done in the onStop() lifecycle callback.
on an Observable to produce another observable. • Manipulate how data are emitted • Manipulate how Observables are observed (threading) • Combine data streamed in different ways