Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pedroql/mvflow
Simple Android MVI architecture using Kotlin Flows
https://github.com/pedroql/mvflow
android android-library kotlin kotlin-flow mvi mvi-android mvi-architecture
Last synced: 3 months ago
JSON representation
Simple Android MVI architecture using Kotlin Flows
- Host: GitHub
- URL: https://github.com/pedroql/mvflow
- Owner: pedroql
- License: mit
- Created: 2020-06-20T21:29:00.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-11T14:43:11.000Z (almost 4 years ago)
- Last Synced: 2024-08-01T19:56:33.208Z (6 months ago)
- Topics: android, android-library, kotlin, kotlin-flow, mvi, mvi-android, mvi-architecture
- Language: Kotlin
- Homepage:
- Size: 741 KB
- Stars: 123
- Watchers: 4
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - pedroql/mvflow - Simple Android MVI architecture using Kotlin Flows (Kotlin)
README
# MVFlow
**Simple Android* MVI architecture using kotlin flows**_\* The library is platform-neutral but was designed with Android in mind_
[![CI status](https://github.com/pedroql/mvflow/workflows/Build%20project/badge.svg?branch=master)](https://github.com/pedroql/mvflow/actions?query=workflow%3A%22Build+project%22+branch%3Amaster)
[![CI status](https://github.com/pedroql/mvflow/workflows/Build%20and%20prepare%20release/badge.svg)](https://github.com/pedroql/mvflow/actions?query=workflow%3A%22Build+and+prepare+release%22)
[![Download ](https://api.bintray.com/packages/pedroql/MVFlow/mvflow-core/images/download.svg)](https://bintray.com/pedroql/MVFlow/mvflow-core/_latestVersion)Check [our website](https://pedroql.github.io/mvflow/) for all information about the library!
## Objectives
We set off with the objective of creating a minimalistic library, simple yet with all the
capabilities you need.### Minimalistic yet complete
MVFlow has a very small API surface. It strives to be the smallest conceivable MVI library that could exist.
In just a few minutes you will know everything there is to know about the API!### Simple
The library introduces few - if any - new concepts outside MVI,
[Kotlin coroutines](https://kotlinlang.org/docs/reference/coroutines/basics.html), and
[Kotlin flows](https://kotlinlang.org/docs/reference/coroutines/flow.html).If you are familiar with those concepts, you can start using the library without a problem; if you are new to some of these
concepts, you will be able to apply those concepts outside this library too.### Coroutines and flows as powerful abstractions
We believe that coroutines and flows are extremely powerful concepts that can be applied to the MVI architecture.
They enable us to build a very powerful API with a small and simple surface.Here are some advantages that they bring:
* Coroutines make asynchronous calls very simple to write and easy to reason about;
* Flows are a great abstraction to represent user events (clicks) and updates from background work;
* Coroutine scopes make handling the lifecycle of requests very simple
## API
You can find a guide to this library on [MVFlow's website](https://pedroql.github.io/mvflow/).
If you would like to take a look behind the scenes,
[MVFlow.kt](https://github.com/pedroql/mvflow/blob/master/mvflow-core/src/main/kotlin/net/pedroloureiro/mvflow/MVFlow.kt)
contains all the logic in this library. PRs and feedback welcome!You can also browse the code of the
[sample Android app](https://github.com/pedroql/mvflow/tree/master/samples/android-app).## Inspiration
This library got a lot of inspiration from other libraries. We would like to thank:
* [Orbit MVI](https://github.com/babylonhealth/orbit-mvi/)
* [MVICore](https://badoo.github.io/MVICore/)
* [Knot](https://github.com/beworker/knot)And everyone who contributed towards those libraries (and their respective inspirations).