Kotlin multiplatform model-view-presenter framework. This small in terms of API size framework allows you to create testable model and presenter abstractions, with view implementations on any platform.
To use in multiplatform project add:
dependencies {
...
implementation("com.olekdia:mvp-common:0.3.0")
}
To use in platform specific projects include one of the following:
dependencies {
implementation("com.olekdia:mvp-common-jvm:0.3.0")
implementation("com.olekdia:mvp-common-js:0.3.0")
implementation("com.olekdia:mvp-common-native:0.3.0")
}
TodoMVP is an application that is build to show how to use the framework. It consists from two modules:
- core-app - is a platform independent module that contains:
- domain - contains business logic in models, data classes, repository interfaces
- presentation - contains presenters and view interfaces and manager interfaces
- android-app - android specific code which interacts with core module:
- presentation - contains implementations of views which is activities, fragments or dialog fragments
- data - contains implementations of repository interfaces, extensions on entries
core-app - contains 30 kotlin files with 900 lines of code.
android-app - contains 23 kotlin files with 1662 lines of code.
About 35% of code was moved to platform independent testable module