A sample application illustrating the clean Architecture using Android Development Best Practices. This application is built on using the JSON PlaceHolder API which is a collection of dummy json apis.
The application uses Clean Architecture based on MVVM and Repository patterns. Implemented Architecture principles follow Google recommended Guide to app architecture.
The application is written entirely in Kotlin.
Android Jetpack is used as an Architecture glue including but not limited to ViewModel, LiveData, Lifecycles, Navigation, Room and Data Binding. See a complete list in "Libraries used" section.
The application does network HTTP requests via Retrofit, OkHttp and GSON. Loaded data is saved to SQL based database Room, which serves as single source of truth and support offline mode.
Kotlin Coroutines manage background threads with simplified code and reducing needs for callbacks. Combination of Coroutines and Kotlin build in functions (transformation, collections) are preferred over RxJava 2.
Navigation component manages in-app navigation.
Dagger 2 is used for dependency injection.
Glide is used for image loading and Timber for logging.
- Json PlaceHolder - A Collection of json data used for sample application.
- Architecture - A collection of libraries that help you design robust, testable, and maintainable apps. Start with classes for managing your UI component lifecycle and handling data persistence.
- ViewModel - store and manage UI-related data in a lifecycle conscious way
- LiveData - notify the view when data changes .
- Lifecycle - perform action when lifecycle state changes
- Navigation - Handle everything needed for in-app navigation.
- AppCompat - Degrade gracefully on older versions of Android.
- Android KTX - Write more concise, idiomatic Kotlin code.
- Room - SQLite database with in-app objects and compile-time checks
- DataBinding - bind UI components to data sources
- Material - Material Components.
- Coroutine - performs background tasks
- Retrofit2- networking
- Gson - convert Java Objects into their JSON and vice versa
- Dagger2 - dependency injector