In the D-KMP sample landing page, I have added the
instructions to write
your own D-KMP app. You can build very quickly an app using:
KMP,
JetpackCompose and
SwiftUI.
Give it a go, and provide your feedback. We only grow by sharing!
The main characteristics of the D-KMP Architecture:
•
it fully shares the ViewModel (and the
DataLayer)
•
coroutine scopes are
cancelled/reinitialized automatically, based on the current active screens and the app lifecycle (using LifecycleOwner on
Android and the SwiftUI lifecycle on
iOS)
• it implements the
MVI pattern and the
unidirectional data flow
• it implements the
CQRS pattern, by providing 2 types of functions to the UI layer:
Events and
StateProviders
• it uses Kotlin's
StateFlow to trigger UI layer recompositions
https://github.com/dbaroncelli/D-KMP-sample