https://github.com/linx64/mylist
An example of Flow, Clean Architecture, Koin, ListAdapter and Usecases.
https://github.com/linx64/mylist
Last synced: about 2 months ago
JSON representation
An example of Flow, Clean Architecture, Koin, ListAdapter and Usecases.
- Host: GitHub
- URL: https://github.com/linx64/mylist
- Owner: LinX64
- Created: 2022-10-22T22:04:47.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-23T12:21:04.000Z (over 3 years ago)
- Last Synced: 2026-01-03T01:06:55.130Z (6 months ago)
- Language: Kotlin
- Homepage:
- Size: 109 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My Servers List
An example of Flow, Clean Architecture, Koin, ListAdapter and Usecases.
### Why not RecyclerView Adapter, ListAdapter?
`ListAdapter` is just an extension of `RecyclerView.Adapter`. It computes diffs between Lists on a background thread with AsyncListDiff.
We need to pass DiffUtil class in the `ListAdapter` To do the computation and check between the items. There are also no performance differences between that RecyclerView adapter and the `list adapter`.
Advantages: No need to have a submit list method to set the data. Everything is being handled by calling `submitList()`
### Why Koin?
I always used to use Hilt-Dagger for DI but seems like Koin is much simpler and there is only one problem with it. It basically resolves dependencies at runtime, and this is the most important downside of Koin, however, it is really easy to use compared to Hilt and dagger.