Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/patloew/countries
An example Android app using Retrofit, Realm, Parceler, Dagger and the MVVM pattern with the data binding lib.
https://github.com/patloew/countries
android android-architecture android-mvvm dagger data-binding gson kotlin kotlin-android mvvm mvvm-pattern parceler realm retrofit
Last synced: about 2 months ago
JSON representation
An example Android app using Retrofit, Realm, Parceler, Dagger and the MVVM pattern with the data binding lib.
- Host: GitHub
- URL: https://github.com/patloew/countries
- Owner: patloew
- License: other
- Created: 2016-03-26T14:11:54.000Z (over 8 years ago)
- Default Branch: kotlin
- Last Pushed: 2018-07-06T11:46:31.000Z (over 6 years ago)
- Last Synced: 2024-02-11T18:46:08.430Z (10 months ago)
- Topics: android, android-architecture, android-mvvm, dagger, data-binding, gson, kotlin, kotlin-android, mvvm, mvvm-pattern, parceler, realm, retrofit
- Language: Kotlin
- Homepage:
- Size: 547 KB
- Stars: 613
- Watchers: 35
- Forks: 105
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-kotlin - countries - An example Android app using Retrofit, Realm, Parceler, Dagger and the MVVM pattern with the data binding lib. (Libraries)
README
# Countries
[![Build Status](https://travis-ci.org/patloew/countries.svg?branch=kotlin)](https://travis-ci.org/patloew/countries)
A sample Android app written in Kotlin, which lists all countries with some additional information (currencies, languages, …). The app uses the MVVM pattern with the [Android data binding lib](http://developer.android.com/tools/data-binding/guide.html). Countries can be bookmarked and are then stored locally with [Realm](https://github.com/realm/realm-java). [Retrofit](https://github.com/square/retrofit) is used to fetch the country information from the free [REST Countries](http://restcountries.eu) service. For JSON parsing, custom [Gson](https://github.com/google/gson) TypeAdapters are used. [PaperParcel](https://github.com/grandstaish/paperparcel) is used to make the Country objects Parcelable. Also, [Dagger 2](https://github.com/google/dagger) is used for dependency injection.
The purpose of this is app is to show how:
* [the MVVM architectural pattern can be used with the data binding library](https://nullpointer.wtf/android/mvvm-architecture-data-binding-library/)
* [Retrofit, Realm, PaperParcel and Gson with custom TypeAdapters work together](https://nullpointer.wtf/android/using-retrofit-realm-parceler/)
* Dagger 2 can be used with different ScopesThis project can also be used as a template for new apps. Check out the template branch for a cleaned up version of this project.
# License
Copyright 2016 Patrick Löwenstein
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.