Skip to content

RxJava2, Dagger2, Clean architecture and a lot more

Notifications You must be signed in to change notification settings

azemZejnil/TvShowsAndMovies

Repository files navigation

RESTful API application

A showcase of RxJava and Model View Presenter, plus a number of other popular libraries for Android development, including Retrofit, Moshi, Dagger2, ButterKnife... Application which pulls data from Themoviedatabase. It lists highest rated movies and tvshows, reviews and trailers. When you click on a movie, you are transfered to movie details. There is also a search movie/tvshow option


Model classes

There are tiny differences in how the classes are structured on the server.
Because of those differences, I couldn't make same class for all results (both movies and tvshows) and had to treat them separately.

Pros of using MVP

This setup has a number of advantages over a non-MVP app architecture It allows high level of abstraction where each module is dependent on the interface and knows very little about other modules implementation. That allows making changes easier, easier testing, supporting orientation changes is with less effort and so on.
The power of RxJava and exposing Observables via the View interface, allows our Presenter to be entirely stateles.

Dependency injection

For this matter I used Dagger2.
There is the 'AppComponent' at the application level which provides every other component (subcomponent*). Each application component has it's own dependency injection component and each one of them is included into AppComponent. This way we have everything structured together and it is easy to use (inject) across the application.

About

RxJava2, Dagger2, Clean architecture and a lot more

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages