kanawish/android-mvi-sample
关于
基于 Google 架构示例的 MVI 实现示例。
其他项目实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文android-mvi-sample
Example MVI implementation, based off of Google's architectural samples.
Description
This is a sample implementation of the Model View Intent pattern. Full Android examples for MVI are hard to find.
Target audience include, but not limited to:
- Developers making the pivot from an imperative to declarative style of programming.
- Developers looking for working example of functional or reactive programming on Android.
Here are some articles/examples explaining the core principles of MVI and unidirectional flow:
- http://hannesdorfmann.com/android/model-view-intent
- https://cycle.js.org/model-view-intent.html
- http://thenewstack.io/developers-need-know-mvi-model-view-intent/
- http://blog.danlew.net/2017/07/27/an-introduction-to-functional-reactive-programming/
- https://proandroiddev.com/mvi-a-new-member-of-the-mv-band-6f7f0d23bc8a
Key Application Components
- ModelStore.kt: a generic Model Store inspired by Redux
- Intent.kt: basic DSL for building Intents and Reducers for generic types.
- TaskEditorState.kt: sealed class + reducer based state machine.
Stack
One goal of this repo is to keep things as light as possible. The core libraries used are:
- Kotlin
- RxJava 2
- RxBindings
- RxRelay
- Retrofit
- Toothpick DI
If you require a very lightweight project, and still want to do MVI, it's not unreasonable to think you could do without RxJava. As of writing, RxJava dependencies weighs in at about ~2MB.
Once you grasp the basics, I suggest you explore the following existing libraries:
探索相关项目
加载中…