
UDF library leverages The Elm Architecture to simplify application logic management. Features include state management, message handling, side effects, and UI adaptation, enhancing maintainability and testability.
Kombucha UDF is a UDF library based on The Elm Architecture (TEA) concepts that helps to focus on logic of you application, rather than understanding what is going on.
dependencies {
// Core dependency for main functionality
implementation("io.github.ikarenkov:kombucha-core:${version}")
// For convinien mapping ui and preserving loosing ui effects
implementation("io.github.ikarenkov:kombucha-ui-adapter:${version}")
// For testing
testImplementation("io.github.ikarenkov:kombucha-test:${version}")
}kotlin {
sourceSets {
commonMain.dependencies {
// Core dependency for main functionality
implementation("io.github.ikarenkov:kombucha-core:${version}")
// For convinien mapping ui and preserving loosing ui effects
implementation("io.github.ikarenkov:kombucha-ui-adapter:${version}")
}
commonTest.dependencies {
// For testing
testImplementation("io.github.ikarenkov:kombucha-test:${version}")
}
}
}Take a look at CounterFeature for simple counter store implementation.
Msg, State and Eff inside.EffectHandler for side effects and unstable behavior.
CounterEffectHandle
counterDslReducerReducer and CounterEffectHandler.// to send a message
store.accept(Msg.OnIncreaseClick)
// to observe states
store.state.collect { ... }
// to observe effectts
store.effects.collect { ... }There are 3 kotlin multiplatform libraries available for jvm, ios and js. Check out modules README.md for detailed description.
Store maintains the application's state and orchestrates the interactions between components. Basicly, Store is a base UDF components to interact, that holds state and can accept some messages to handle. It has one input and two outputs:
Let's take a look to Store main components:
There are 3 main model: Msg, State, Eff. Msg - describes intention to do something. It can be user click, result from your back end or anything else. State - the state that is stored in store. It represents the state of your feature. Eff - describes side effects, that should be executed. It's just a description of your intention to something that is not a pure function. F.e. it can be request to load some data from backend, saving or reading data from database and e.t.c.
You can implement StoreFactory to customize creation of the store instead of using direct inheritance. It helps to implement dependency inversion principe. F.e. it can be used to implement exception logging
Kombucha UDF is a UDF library based on The Elm Architecture (TEA) concepts that helps to focus on logic of you application, rather than understanding what is going on.
dependencies {
// Core dependency for main functionality
implementation("io.github.ikarenkov:kombucha-core:${version}")
// For convinien mapping ui and preserving loosing ui effects
implementation("io.github.ikarenkov:kombucha-ui-adapter:${version}")
// For testing
testImplementation("io.github.ikarenkov:kombucha-test:${version}")
}kotlin {
sourceSets {
commonMain.dependencies {
// Core dependency for main functionality
implementation("io.github.ikarenkov:kombucha-core:${version}")
// For convinien mapping ui and preserving loosing ui effects
implementation("io.github.ikarenkov:kombucha-ui-adapter:${version}")
}
commonTest.dependencies {
// For testing
testImplementation("io.github.ikarenkov:kombucha-test:${version}")
}
}
}Take a look at CounterFeature for simple counter store implementation.
Msg, State and Eff inside.EffectHandler for side effects and unstable behavior.
CounterEffectHandle
counterDslReducerReducer and CounterEffectHandler.// to send a message
store.accept(Msg.OnIncreaseClick)
// to observe states
store.state.collect { ... }
// to observe effectts
store.effects.collect { ... }There are 3 kotlin multiplatform libraries available for jvm, ios and js. Check out modules README.md for detailed description.
Store maintains the application's state and orchestrates the interactions between components. Basicly, Store is a base UDF components to interact, that holds state and can accept some messages to handle. It has one input and two outputs:
Let's take a look to Store main components:
There are 3 main model: Msg, State, Eff. Msg - describes intention to do something. It can be user click, result from your back end or anything else. State - the state that is stored in store. It represents the state of your feature. Eff - describes side effects, that should be executed. It's just a description of your intention to something that is not a pure function. F.e. it can be request to load some data from backend, saving or reading data from database and e.t.c.
You can implement StoreFactory to customize creation of the store instead of using direct inheritance. It helps to implement dependency inversion principe. F.e. it can be used to implement exception logging