A project which showcases usage of Dagger 2, Rxjava and retrolambda among other open source libraries.
This project follows the following principles:
Methods for retrieving domain objects should delegate to a specialized Repository object such that alternative storage implementations may be easily interchanged.
Api models usually different from the domain models. We have to map the response to domain models.
An interactor (or usecase) represents a single use case in the app. It contains the business logit to manipulate model objects (Entities) to carry out a specific task. The work done in an interactor is independent of any type of UI.
Presenters are composed with interactors (usecases) that perform the job in a new thread outside the android UI thread, and come back using a callback with the data that will be rendered in the view.
The view is going to be abstracted using an interface implemented by android components. The views have different view model.
RxJava is an implementation of the Reactive Extensions (Rx) on the JVM, courtesy of Netflix. Rx was first conceived by Erik Meijer on the Microsoft .NET platform, as a way of combining data or event streams with reactive objects and functional composition. In Rx, events are modeled as observable streams to which observers are subscribed. These streams, or observables for short, can be filtered, transformed, and composed in various ways before their results are emitted to an observer. Every observer is defined within three messages: onNext, onCompleted, and onError. Concurrency is a variable in this equation, and abstracted away in the form of schedulers. Generally, every observable stream exposes an interface that is modeled after concurrent execution flows (i.e. you don’t call it, you subscribe to it), but by default is executed synchronously.