# model-view-intent

Published articles for model-view-intent.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Reclaim the reactivity of your state management, say no to imperative MVI

DevFeed: [Reclaim the reactivity of your state management, say no to imperative MVI](<https://devfeed.tech/articles/reclaim-the-reactivity-of-your-state-management-say-no-to-imperative-mvi-25932.md>)

Original publisher: [Read original article](<https://proandroiddev.com/reclaim-the-reactivity-of-your-state-management-say-no-to-imperative-mvi-3b23ca6b8537?source=rss-7a8d96da8cb6------2>)

Author: Gabor Varadi

Published: 2022-05-02T05:05:46Z

Content type: opinion

Language: en

Sources: [Stories by Gabor Varadi on Medium](<https://devfeed.tech/sources/stories-by-gabor-varadi-on-medium.md>)

Topics: [reactive](<https://devfeed.tech/topics/reactive.md>), [Redux](<https://devfeed.tech/topics/redux.md>), [Elm](<https://devfeed.tech/topics/elm.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [architecture-pattern](<https://devfeed.tech/tags/architecture-pattern.md>), [clean-code](<https://devfeed.tech/tags/clean-code.md>), [elm](<https://devfeed.tech/tags/elm.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [model-view-intent](<https://devfeed.tech/tags/model-view-intent.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [redux](<https://devfeed.tech/tags/redux.md>), [state](<https://devfeed.tech/tags/state.md>), [state-management](<https://devfeed.tech/tags/state-management.md>)

### AI overview

The article critiques imperative MVI-style state management as overly complex and boilerplate-heavy. It traces MVI's web-oriented history through Cycle.js, The Elm Architecture, and Redux, and questions whether those patterns fit statically typed application development.

### Source excerpt

Do you find yourself chasing for "clean code, clean architecture, clean design, clean state management" yet still feel bogged down in a sea of boilerplate for even the simplest of tasks -- such as showing a simple list fetched with a coroutine? Surely this could be done in a single line or maybe about seven, but it certainly shouldn't need gigantic case-whens, three layers of indirection, and so on? Well, normally you could just invoke functions on ViewModel and it would work, but if you're forced to seek the "architectural holy grail", no one around you will trust your code unless you add at least one sealed class called ViewActions, and increase the cyclomatic complexity of your "action handler" function until it feels "just clean enough". (After all, surely the more completely unrelated things a single function does based on its argument, the more it has a "single responsibility" of handling literally everything, which is why you know it's definitely the best possible way to do it. 😏) Anyway, the boilerplate of coupling together all aspects into a single class, whether it is a function call or state property, this all has a history: namely, it came from the web. The brief history of MVI MVI stands for "model-view-intent" and comes from a (not very popular for use in production) Javascript framework called Cycle.js, hand-in-hand with a (not popular anymore) concept called "The Elm Architecture" defined as the best practices and intended use of an experimental (and since 2019, unmaintained) "functional-reactive programming language for the web" called ELM. Then again, these didn't come from a vacuum either -- the originator is Redux, in 2015. The general idea was to implement a state machine using the command processor pattern in Javascript, thereby supporting "undo" functionality (also often referred to as "time-travel debugging"). Of course, most design decisions of Redux only make sense for Javascript -- as it is a language with no static typing. It makes sense to

## \[Перевод\] Архитектурный шаблон MVI в Kotlin Multiplatform, часть 1

DevFeed: [\[Перевод\] Архитектурный шаблон MVI в Kotlin Multiplatform, часть 1](<https://devfeed.tech/articles/mvi-kotlin-multiplatform-1-23610.md>)

Original publisher: [Read original article](<https://habr.com/ru/companies/badoo/articles/501968/>)

Author: arkivanov (Badoo)

Published: 2020-05-14T14:01:02Z

Content type: tutorial

Language: ru

Sources: [Badoo EN](<https://devfeed.tech/sources/badoo-en.md>), [Badoo RU](<https://devfeed.tech/sources/badoo-ru.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [ios](<https://devfeed.tech/tags/ios.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [kotlin-native](<https://devfeed.tech/tags/kotlin-native.md>), [model-view-intent](<https://devfeed.tech/tags/model-view-intent.md>), [mpp](<https://devfeed.tech/tags/mpp.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [mvvm](<https://devfeed.tech/tags/mvvm.md>), [reactive](<https://devfeed.tech/tags/reactive.md>)

### AI overview

This first article in a three-part series describes using the MVI architectural pattern with Kotlin Multiplatform. It introduces a shared module intended for integration with iOS and Android applications and discusses related testing topics. The author argues that MVI is a better fit for Kotlin Multiplatform than MVVM or an added clean-architecture layer, while noting that the article does not teach Kotlin Multiplatform fundamentals or project setup.

### Source excerpt

Около года назад я заинтересовался новой технологией Kotlin Multiplatform. Она позволяет писать общий код и компилировать его под разные платформы, имея при этом доступ к их API. С тех пор я активно экспериментирую в этой области и продвигаю этот инструмент в нашей компании. Одним из результатов, например, является наша библиотека Reaktive -- Reactive Extensions для Kotlin Multiplatform. В приложениях Badoo и Bumble для разработки под Android мы используем архитектурный шаблон MVI (подробнее о нашей архитектуре читайте в статье Zsolt Kocsi: "Современная MVI-архитектура на базе Kotlin"). Работая над различными проектами, я стал большим поклонником этого подхода. Конечно, я не мог упустить возможность попробовать MVI и в Kotlin Multiplatform. Тем более случай был подходящий: нам нужно было написать примеры для библиотеки Reaktive. После этих моих экспериментов я был вдохновлён MVI ещё больше. Я всегда обращаю внимание на то, как разработчики используют Kotlin Multiplatform и как они выстраивают архитектуру подобных проектов. По моим наблюдениям, среднестатистический разработчик Kotlin Multiplatform -- это на самом деле Android-разработчик, который в своей работе использует шаблон MVVM просто потому, что так привык. Некоторые дополнительно применяют "чистую архитектуру". Однако, на мой взгляд, для Kotlin Multiplatform лучше всего подходит именно MVI, а "чистая архитектура" является ненужным усложнением. Поэтому я решил написать эту серию из трёх статей на следующие темы: Краткое описание шаблона MVI, постановка задачи и создание общего модуля с использованием Kotlin Multiplatform. Интеграция общего модуля в iOS- и Android-приложения. Модульное и интеграционное тестирование. Ниже -- первая статья серии. Она будет интересна всем, кто уже использует или только планирует использовать Kotlin Multiplatform.

## Reactive Apps with Model-View-Intent - Part 3: State Reducer

DevFeed: [Reactive Apps with Model-View-Intent - Part 3: State Reducer](<https://devfeed.tech/articles/reactive-apps-with-model-view-intent-part-3-state-reducer-25456.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/mosby3-mvi-3/>)

Author: Hannes Dorfmann

Published: 2017-01-19T09:00:00Z

Content type: tutorial

Language: en

Sources: [Hannes Dorfmann](<https://devfeed.tech/sources/hannes-dorfmann.md>)

Topics: [reactive](<https://devfeed.tech/topics/reactive.md>), [App](<https://devfeed.tech/topics/app.md>), [Code](<https://devfeed.tech/topics/code.md>), [ui](<https://devfeed.tech/topics/ui.md>), [implementation](<https://devfeed.tech/topics/implementation.md>)

Tags: [3](<https://devfeed.tech/tags/3.md>), [apps](<https://devfeed.tech/tags/apps.md>), [blog](<https://devfeed.tech/tags/blog.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [build](<https://devfeed.tech/tags/build.md>), [code](<https://devfeed.tech/tags/code.md>), [component](<https://devfeed.tech/tags/component.md>), [data](<https://devfeed.tech/tags/data.md>), [flow](<https://devfeed.tech/tags/flow.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [implement](<https://devfeed.tech/tags/implement.md>), [interface](<https://devfeed.tech/tags/interface.md>), [load](<https://devfeed.tech/tags/load.md>), [merge](<https://devfeed.tech/tags/merge.md>), [model](<https://devfeed.tech/tags/model.md>), [model-view-intent](<https://devfeed.tech/tags/model-view-intent.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [screen](<https://devfeed.tech/tags/screen.md>), [state](<https://devfeed.tech/tags/state.md>)

### AI overview

Part 3 of a tutorial on Reactive Apps with Model-View-Intent explains how to build a more complex MVI screen using a state reducer and unidirectional data flow. The example includes categorized product lists, loading more items, pull-to-refresh, pagination, concurrent actions, failures, and presenter logic.

### Source excerpt

In the previous part we have discussed how to implement a simple screen with the Model-View-Intent pattern with an unidirectional data flow. In this blog post we are going to build a more complex screen with MVI with the help of a state reducer. If you haven't read part 2 yet, you should read that before continue with this blog post, because there is described how we connect the View via Presenter with the business logic and how data flows unidirectional.

## Model-View-Intent on Android

DevFeed: [Model-View-Intent on Android](<https://devfeed.tech/articles/model-view-intent-on-android-25451.md>)

Original publisher: [Read original article](<https://hannesdorfmann.com/android/model-view-intent/>)

Author: Hannes Dorfmann

Published: 2016-03-04T09:00:00Z

Content type: tutorial

Language: en

Sources: [Hannes Dorfmann](<https://devfeed.tech/sources/hannes-dorfmann.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [ui](<https://devfeed.tech/topics/ui.md>), [mvc](<https://devfeed.tech/topics/mvc.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Redux](<https://devfeed.tech/topics/redux.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [functional-programming](<https://devfeed.tech/tags/functional-programming.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [model-view-intent](<https://devfeed.tech/tags/model-view-intent.md>), [mvc](<https://devfeed.tech/tags/mvc.md>), [mvi](<https://devfeed.tech/tags/mvi.md>), [react](<https://devfeed.tech/tags/react.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [redux](<https://devfeed.tech/tags/redux.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>), [ui](<https://devfeed.tech/tags/ui.md>), [view](<https://devfeed.tech/tags/view.md>)

### AI overview

This article introduces Model-View-Intent (MVI) for Android UI architecture. It explains MVI's reliance on reactive and functional programming, relates it to MVC, and discusses influences from Redux, React, and Cycle.js.

### Source excerpt

As developers we should always think outside the box. A month ago Artem Zinnatullin and I have discussed some architectural trends on android and on other platforms, like .NET and javascript, in his Podcast The Context. A few days later Christina Lee gave an awesome lightning talk Redux-ing UI Bugs during square's The Journey of Android Engineers event.