All Projects → arkivanov → Mvikotlin

arkivanov / Mvikotlin

Licence: apache-2.0
Extendable MVI framework for Kotlin Multiplatform with powerful debugging tools (logging and time travel)

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Mvikotlin

Playframework
Play Framework
Stars: ✭ 12,041 (+2392.96%)
Mutual labels:  hacktoberfest, framework, jvm
Klock
Multiplatform Date and time library for Kotlin
Stars: ✭ 569 (+17.81%)
Mutual labels:  multiplatform, jvm, native
Commands
Java Command Dispatch Framework - (Bukkit, Spigot, Paper, Sponge, Bungee, JDA, Velocity supported, generically usable anywhere)
Stars: ✭ 266 (-44.93%)
Mutual labels:  hacktoberfest, framework
Front End Web Development Resources
This repository contains content which will be helpful in your journey as a front-end Web Developer
Stars: ✭ 3,452 (+614.7%)
Mutual labels:  hacktoberfest, framework
Pode
Pode is a Cross-Platform PowerShell web framework for creating REST APIs, Web Sites, and TCP/SMTP servers
Stars: ✭ 329 (-31.88%)
Mutual labels:  hacktoberfest, framework
imgui-java
JNI based binding for Dear ImGui
Stars: ✭ 270 (-44.1%)
Mutual labels:  native, jvm
Multiplatform-LiveData
Multiplatorm implementation of LiveDatas / MVVM in kotlin android & native ios
Stars: ✭ 95 (-80.33%)
Mutual labels:  native, multiplatform
Dotenv Kotlin
🗝️ Dotenv is a module that loads environment variables from a .env file
Stars: ✭ 326 (-32.51%)
Mutual labels:  hacktoberfest, jvm
Aboutlibraries
AboutLibraries automatically detects all dependencies of a project and collects their information including the license. Optionally visualising it via the provided ui components.
Stars: ✭ 2,777 (+474.95%)
Mutual labels:  hacktoberfest, multiplatform
Freedomotic
Open IoT Framework
Stars: ✭ 354 (-26.71%)
Mutual labels:  hacktoberfest, framework
Loopback Next
LoopBack makes it easy to build modern API applications that require complex integrations.
Stars: ✭ 3,972 (+722.36%)
Mutual labels:  hacktoberfest, framework
Advanceddlsupport
Delegate-based C# P/Invoke alternative - compatible with all platforms and runtimes.
Stars: ✭ 419 (-13.25%)
Mutual labels:  hacktoberfest, native
Multiplatform-Log
Kotlin Multi Platform Logger, for android an ios : Logcat & print
Stars: ✭ 49 (-89.86%)
Mutual labels:  native, multiplatform
SquirrelJME
SquirrelJME is a Java ME 8 Virtual Machine for embedded and Internet of Things devices. It has the ultimate goal of being 99.9% compatible with the Java ME standard.
Stars: ✭ 148 (-69.36%)
Mutual labels:  native, jvm
Common
A set of common utils for consuming Web APIs with Angular
Stars: ✭ 259 (-46.38%)
Mutual labels:  hacktoberfest, native
Zencart
Zen Cart® is a full-function e-commerce application for your website.
Stars: ✭ 250 (-48.24%)
Mutual labels:  hacktoberfest, framework
Komputation
Komputation is a neural network framework for the Java Virtual Machine written in Kotlin and CUDA C.
Stars: ✭ 295 (-38.92%)
Mutual labels:  framework, jvm
Polaris
A cross-platform, minimalist web framework for PowerShell
Stars: ✭ 464 (-3.93%)
Mutual labels:  hacktoberfest, framework
Openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,802 (+480.12%)
Mutual labels:  hacktoberfest, jvm
Prest
PostgreSQL ➕ REST, low-code, simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new
Stars: ✭ 3,023 (+525.88%)
Mutual labels:  hacktoberfest, framework

Download License kotlinlang|MVIKotlin

Should you have any questions or ideas please welcome to the Slack channel: #mvikotlin

Overview

What is MVI

MVI stands for Model-View-Intent. It is an architectural pattern that utilizes unidirectional data flow. The data circulates between Model and View only in one direction - from Model to View and from View to Model.

MVI

What is MVIKotlin

MVIKotlin is a Kotlin Multiplatform framework that provides a way of (not only) writing shared code using MVI pattern. It also includes powerful debug tools like logging and time travel. The main functionality of the framework does not depend on any reactive nor coroutines library. Extensions for Reaktive and for Coroutines libraries are provided as separate modules.

MVIKotlin

Responsibility

MVIKotlin does not bring or enforce any particular architecture. Its responsibility can be described as follows:

  • To provide a single source of truth for State (the scope is not defined, it can be a whole app, a screen, a feature, or a part of a feature);
  • To provide an abstraction for UI with efficient updates (however this is not obligatory, you can use whatever you want);
  • To provide lifecycle aware connections (binding) between inputs and outputs (again this is not obligatory in any way).

Everything else is out of scope of the library, there are no definitions for "screens", "features", "modules", etc. Also, no particular reactive framework is enforced/exposed. This gives a lot of flexibility:

  • MVIKotlin can be introduced incrementally (e.g. you can start using it in a small feature and then expand gradually);
  • You can use/experiment with different architectures, approaches and/or libraries for navigation, UI, modularization, etc;
  • Use whatever reactive framework you like or don't use it at all.

You can find one of the architecture options in the samples. Again, this is just an example of one possible solution.

Setup

Recommended minimum Gradle version is 5.3. Please read first the documentation about metadata publishing mode.

MVIKotlin is published to Bintray, the repository is synchronized with JCenter. Make sure you have the JCenter repository specified in your build.gradle:

repositories {
    jcenter()
}

There are a number of modules published:

  • mvikotlin - core interfaces and functionality (multiplatform)
  • mvikotlin-main - the main module with the default Store implementation (mutiplatform)
  • mvikotlin-logging - logging functionality (mutiplatform)
  • mvikotlin-timetravel - time travel feature (mutiplatform)
  • mvikotlin-extensions-reaktive - extensions set for Reaktive library (multiplatform)
  • mvikotlin-extensions-coroutines - extensions set for coroutines (multiplatform)
  • keepers - provides StateKeeper and InstanceKeeper API for state preservation and objects retaining
  • rx - a tiny module with abstractions over rx and coroutines (multiplatform)

Add required modules to your module`s build.gradle file:

implementation "com.arkivanov.mvikotlin:<module-name>:<version>"

Features

  • Multiplatform: Android, JVM, JavaScript, iosX64, iosArm64, macosX64, linuxX64
  • Does not depend on any reactive library or coroutines
  • Extensions for Reaktive library
  • Extensions for Coroutines
  • Multithreading friendly (freezable in Kotlin Native if needed)
  • Logging functionality with customizable logger and formatter
  • Time travel feature:
    • Multiplatform for all supported targets
    • Plug-and-play UI for Android
    • Plug-and-play UI for iOS (copy-paste from the sample app)
    • Export/import events for Android
    • IDEA and Android Studio plugin for Android apps
    • MacOS client application for iOS and macOS apps

Documentation

https://arkivanov.github.io/MVIKotlin

Sample project

The sample project is a todo list with details view.

  • Shared module using Reaktive is here
  • Shared module using coroutines is here
  • Sample Android application with both Reaktive and coroutines implementations, plus logging and time travel is here
  • Sample iOS application with Reaktive implementation only, plus logging and time travel is here
  • Sample JavaScript application with both Reaktive and coroutines implementations, plus logging and time travel is here

Author

Twitter: @arkann1985

If you like this project you can always Buy Me A Coffee ;-)

Inspiration

This project is inspired by Badoo MVICore library.

Watch video (time travel, logs, debug, etc.)

Debugging Android application with MVIKotlin

Debugging Android application with MVIKotlin

Debugging iOS application with MVIKotlin

Debugging iOS application with MVIKotlin

Debugging Android application with IntelliJ IDEA time travel plugin

Debugging Android application with IntelliJ IDEA time travel plugin

Debugging iOS application using MVIKotlin time travel client app

Debugging iOS application using MVIKotlin time travel client app

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].