v3.3.0
Version 3.3.0 is a reactive and a multiplatform
version of fmodel
libraries optimized for Event sourcing, CQRS, and Domain Modeling.
- https://search.maven.org/artifact/com.fraktalio.fmodel/domain/3.3.0/jar
- https://search.maven.org/artifact/com.fraktalio.fmodel/application-vanilla/3.3.0/jar
- https://search.maven.org/artifact/com.fraktalio.fmodel/application-arrow/3.3.0/jar
Maven coordinates
<dependency>
<groupId>com.fraktalio.fmodel</groupId>
<artifactId>domain</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>com.fraktalio.fmodel</groupId>
<artifactId>application-vanilla</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>com.fraktalio.fmodel</groupId>
<artifactId>application-arrow</artifactId>
<version>3.3.0</version>
</dependency>
- Learn by example on the playground
- Read the blog
- Check the demos
A convenient DSL (builder) for the domain components:
For example:
fun evenNumberDecider(): Decider<EvenNumberCommand?, EvenNumberState, EvenNumberEvent?> =
decider {
initialState {
evenNumberState {
descriptionString { "Initial state" }
valueInt { 0 }
}
}
decide { c, s ->
when (c) {
is AddEvenNumber -> flowOf(
evenNumberAdded {
description { c.description }
value { s.value + c.value }
}
)
is SubtractEvenNumber -> flowOf(
evenNumberSubtracted {
description { c.description }
value { s.value - c.value }
}
)
null -> emptyFlow()
}
}
evolve { s, e ->
when (e) {
is EvenNumberAdded ->
evenNumberState {
description { s.description + e.description }
value { e.value }
}
is EvenNumberSubtracted ->
evenNumberState {
description { s.description - e.description }
value { e.value }
}
null -> s
}
}
}
Minimizing the API
_Decider<C, Si, So, Ei, Eo>
is internal now_View<Si, So, E>
is internal now
There was no true usage of this API, so we have chosen to make it internal, in favor of Decider<C, S, E>
and View<S, E>
.
Previously, Decider
was just a type alias of _Decider
, but these are different types actually and we want to promote that.
We hope to minimize the complexity of the API and make the right thing to do the easy thing to do.
What's Changed
- Update dependency io.arrow-kt:arrow-core to v1.1.3 by @renovate in #134
- Update gradle/gradle-build-action action to v2.3.1 by @renovate in #135
- Update actions/setup-java action to v3.5.1 by @renovate in #136
- Update kotest to v5.5.0 by @renovate in #139
- Update dependency org.jetbrains.kotlin.multiplatform to v1.7.20 by @renovate in #137
- Update gradle/gradle-build-action action to v2.3.2 by @renovate in #138
- Update actions/checkout action to v3.1.0 by @renovate in #140
- Update dependency io.kotest.multiplatform to v5.5.1 by @renovate in #141
- Update kotest to v5.5.1 by @renovate in #142
- Update dependency org.jetbrains.dokka to v1.7.20 by @renovate in #143
- A DSL/Builder for the domain components by @idugalic in #144
- Update actions/setup-java action to v3.6.0 by @renovate in #145
- Update actions/upload-artifact action to v3.1.1 by @renovate in #146
- Update dependency io.kotest.multiplatform to v5.5.2 by @renovate in #148
- Update kotest to v5.5.2 by @renovate in #149
- Update gradle/gradle-build-action action to v2.3.3 by @renovate in #147
- Update kotest to v5.5.3 by @renovate in #151
- Update dependency io.kotest.multiplatform to v5.5.3 by @renovate in #150
- Update dependency io.kotest.multiplatform to v5.5.4 by @renovate in #152
- Update kotest to v5.5.4 by @renovate in #153
- Update dependency org.jetbrains.kotlin.multiplatform to v1.7.21 by @renovate in #154
- Update dependency gradle to v7.6 by @renovate in #155
- Update dependency org.jetbrains.kotlin.multiplatform to v1.7.22 by @renovate in #156
- Update actions/setup-java action to v3.7.0 by @renovate in #157
- Update actions/setup-java action to v3.8.0 by @renovate in #158
- Update actions/checkout action to v3.2.0 by @renovate in #159
- Domain API minimized by @idugalic in #161
- Minimizing the public API of the Domain by @idugalic in #163
- Update dependency org.jetbrains.kotlin.multiplatform to v1.8.0 by @renovate in #162
Full Changelog: v3.2.0...v3.3.0