Consuming Game of Thrones API to demonstrate offline caching using the Network Bound Resource and Room Database
This project brings to table set of best practices, tools, and solutions:
- 100% Kotlin
- Model-View-View Model Architecture
- Dependency Injection
- Material design
- Room local persistence
- Network Bound Resource
This project takes advantage of many popular libraries and tools of the Android ecosystem. Most of the libraries are in the stable version.
- Tech-stack
- Kotlin
- Coroutines - To perform background operations
- Dagger Hilt - For dependency injection
- Jetpack
- Room - Persists data fetched from the API
- View Pager 2 - For creating scwipable screens like when onboarding
- Retrofit for making network calls.
- Kotlin
- Architecture
- MVVM
- Makes it easier to write modular, reusable and easy to test code
- Android Architecture components. An app architecture defines the boundaries between parts of the app and the responsibilities each part should have.
- ViewModel
- Network Bound Resource. This abstract class provide an easy interface to fetch resource from both the database and the network. It works well with the Android architecture component.
- MVVM
Onboarding Screen 1 | Onboarding Screen 2 | Onboarding Screen 3 |
---|---|---|
Save Username | Home Page | Single Character |
MIT License
Copyright (c) 2022 Juma Paul
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.