GithubHelp home page GithubHelp logo

lhb1128 / mvi-dispatcher-ktx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kunminx/mvi-dispatcher-ktx

0.0 0.0 0.0 612 KB

SSOT adult stage, automatically eliminates the high-frequency pain spots of "mutable boilerplate code & mutableSharedFlow.emit abuse & repeatOnLifecycle + SharedFlow miss event".

License: Apache License 2.0

Kotlin 100.00%

mvi-dispatcher-ktx's Introduction

 

排坑小故事:《repeatOnLifecycle + SharedFlow 隐藏坑排查与治理》

 

上期《Google Android 架构设计拆解及改善建议》侧重拆解官方架构 “领域层” 设计误区,并给出改善建议 —— 通过 MVI-Dispatcher 承担 Event-Handler,

然有小伙伴表示,不仅要 MVI-Dispatcher,还想看看 Kotlin 版 MVI 实践

故这期,我们肝个 MVI-Dispatcher-KTX 示例项目,相信查阅后你会耳目一新。

 

收藏或置顶 顺滑转场 删除笔记

 

项目简介

“单向数据流” 是近年公认 “图形化客户端开发” 领域最佳实践,

MVI-Dispatcher 抹除 “单向数据流” 学习成本,使开发者在不熟 mutable、MVI 情况下,仅根据简明易懂 input-output 设计亦可自动实现 “单向数据流” 开发,

KTX 版接口与 MVI-Dispatcher 保持一致,可彻底消除 mutable 样板代码;杜绝 setValue/emit 误用滥用;且可无缝整至 Jetpack MVVM 项目中。

 

implementation 'com.kunminx.arch:mvi-dispatch-ktx:6.0.0-beta'

 

 

What‘s More

本项目由 100% Java MVI-Dispatcher 项目改造而来,

如您正在学习 Kotlin,通过横向对比 MVI-Dispatcher 项目,可快速了解 Android Studio 一键转换后,为因地制宜遵循 Kotlin 特性/风格/思维,我们还可手动完成哪些调整修缮。

区别于避重就轻实验性示例,MVI-Dispatcher 及 MVI-Dispatcher-KTX 提供完成一款记事本软件最少必要源码实现。

故通过该示例您还可获得内容包括:

1.整洁代码风格 & 标准命名规范

2.对 “视图控制器” 知识点深入理解 & 正确使用

3.AndroidX 和 Material Design 全面使用

4.ConstraintLayout 约束布局使用

5.十六进制复合状态管理最佳实践

6.优秀用户体验 & 交互设计

 

Thanks to

AndroidX

Jetpack

SwipeDelMenuLayout

ViewBindingKTX

项目中图标素材来自 iconfinder 提供 免费授权图片

 

Copyright

本项目场景案例及 MVI-Dispatcher-KTX 框架,均属本人独立原创设计,本人对此享有最终解释权。

任何个人或组织,未经与作者本人当面沟通,不得将本项目代码设计及本人对 “唯一可信源” 及 MVI 独家理解用于 "打包贩卖、出书、卖课" 等商业用途。

如需引用借鉴 “本项目框架设计背景及思路” 写作发行,请注明链接出处

 

License

Copyright 2019-present KunMinX

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 at

   http://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.

mvi-dispatcher-ktx's People

Contributors

kunminx avatar goooler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.