GithubHelp home page GithubHelp logo

mvikotlin's Introduction

Download License

MVIDroid to MVIKotlin transition

The library was recently converted to Kotlin Multiplatform. The name of the library was also changed to MVIKotlin, from my point of view it works better for the new format. The previous versions of MVIDroid (Android only) are still available though. You can find MVIDroid README here, and docs here.

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.

MVI

Setup

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

Add Bintray repository into your root build.gradle file:

repositories {
    maven {
        url  "https://dl.bintray.com/arkivanov/maven"
    }
}

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)
  • 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, 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 adjustable verboseness and ability to provide custom logger
  • 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 JVM and Android

Documentation

Coming soon, the code is documented though.

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

Author

Twitter: @arkann1985

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

mvikotlin's People

Contributors

arkivanov 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.