Skip to content

Android developement practice for MVP, MVVM, Architecture Components and Data Binding

Notifications You must be signed in to change notification settings

rascalyen/MyAPIFilms

Repository files navigation

MyAPIFilms IMDB

Showcase common android implementation with MyAPIFilms IMDB API. This app shows “IN THEATERS” movie list on main page, and shows clicked movie details on next page.


Click here for demo video

Technical Features

From this project you should find useful examples like,

  • Build android with MVVM design pattern + ViewModel + LiveData
  • Use Dependency Injection (Dagger2) to separate configuration (properties, imageClient, httpClient, etc.) and UI usage
  • Use Butterknife for view injection in Activity/Fragment
  • Use Retrofit2 and Moshi to call RESTful API and parse returned JSON response
  • RxJAVA as Retrofit2 call adapter
  • Glide as image client
  • Define productFlavors in gradle script
  • Read properties from /res/raw resource (However, BuildConfig is preferable)
  • How to save/restore Fragment's state -> No need thanks to ViewModel
  • Use RecyclerView and CardView

Debug Environment

Quality Assurance

Run "check" task from Gradle

In this project, run check to ensure code quality in the following order: Checkstyle -> Findbugs -> Lint -> PMD -> Unit Tests. You should find all configuration files under config/quality/..

./gradlew check

References

Dagger2 gotcha

TODO

  • MVP -> see branch mvp
  • MVVM + Data binding -> see branch dataBinding
  • RxJava/RxAndroid
  • Kotlin + Coroutines