Skip to content

vivid-money/elmslie

Repository files navigation

Elmslie

Jitpack badge Code quality badge License badge

Elmslie is a minimalistic reactive implementation of TEA/ELM written in kotlin with java support.
Named after George Grant Elmslie, a Scottish-born architect.

Why?

  • Scalable and Reusable: Built-in support for nesting components
  • Reactive: Written with pure Kotlin, but has compatibility mode with RxJava2, RxJava3 and Coroutines
  • Single immutable state: Simplify state management
  • UDF: Say no to spaghetti code with Unidirectional Data Flow

Documentation

This is a visual representation of the architecture:

For more info head to the wiki

Samples

Samples are available here

  • Basic loader for android: link
  • Pure kotlin calculator: link
  • Pure java notes: link
  • Paging with compose: link

Code generation plugin for Android Studio

Plugin is available at the Jetbrains plugin repository More info in the wiki article

Download

Library is distributed through JitPack

Add repository in the root build.gradle

allprojects {
 repositories {
    maven { url "https://jitpack.io" }
 }
}

Add required modules:

  • Core - for pure kotlin ELM implementation

implementation 'com.github.vivid-money.elmslie:elmslie-core:{latest-version}'

  • Android - for android apps only, simplifies lifecycle handling

implementation 'com.github.vivid-money.elmslie:elmslie-android:{latest-version}'

  • RxJava 2 - compatibility module (more info in the wiki article)

implementation 'com.github.vivid-money.elmslie:elmslie-rxjava-2:{latest-version}'

  • Jetpack Compose - for android apps only, simplifies using jetpack compose (not required)

implementation 'com.github.vivid-money.elmslie:elmslie-compose:{latest-version}'

Related articles