MVFlow

Simple MVI architecture using Kotlin Flows

License

License

Categories

Categories

Net
GroupId

GroupId

net.pedroloureiro.mvflow
ArtifactId

ArtifactId

mvflow-core
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

MVFlow
Simple MVI architecture using Kotlin Flows
Project URL

Project URL

https://github.com/pedroql/mvflow
Source Code Management

Source Code Management

https://github.com/pedroql/mvflow

Download mvflow-core

Dependencies

runtime (2)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.4.21
org.jetbrains.kotlinx : kotlinx-coroutines-android jar 1.4.2

Project Modules

There are no modules declared in this project.

MVFlow

Simple Android MVI architecture using kotlin flows*

* The library is platform-neutral but was designed with Android in mind

CI status CI status Download

Check our website 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, and Kotlin flows.

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.

If you would like to take a look behind the scenes, MVFlow.kt contains all the logic in this library. PRs and feedback welcome!

You can also browse the code of the sample Android app.

Inspiration

This library got a lot of inspiration from other libraries. We would like to thank:

And everyone who contributed towards those libraries (and their respective inspirations).

Versions

Version
1.0.2