Skip to content

Example Android project in Kotlin which uses the https://www.metaweather.com/ api and MVVM architecture.

License

Notifications You must be signed in to change notification settings

ghataa/MetaWeather

Repository files navigation

MetaWeather

Example Android project in Kotlin which uses the https://www.metaweather.com/ api.

About the project

Used technologies

Architecture

MetaWeather is a single-Activity Android application which uses MVVM architecture:

alt text

Each layer in the architecture is loosely coupled, mostly with interfaces. The solution is extendable, well-maintainable, and also testable by isolating the different layers/components. The architecture tries to follow the most-used clean code and SOLID principles together with some design patterns like Singleton, Factory, and Dependency Injection.

Data and cache handling

The application uses two different data sources: local and remote. The application communicates with the remote data source via RESTful API with a Retrofit HTTP client. The local data source is an SQLite database implemented with Room. The application uses the local data source as a source of truth, always. If the local data is outdated, it's going to be updated before showing it. It's also possible to force to update the local data from the remote source by using the pull-to-refresh gesture.

Testing

The project contains an example for unit testing. It's also possible to test the different components either with unit or instrumented (or even end-to-end Espresso) tests in the future.

Build project

The project can be compiled by running the build-project.sh file.

About

Example Android project in Kotlin which uses the https://www.metaweather.com/ api and MVVM architecture.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published