Create Your First Fully Cross-Platform Mobile App With Compose Multiplatform 3/4 — Domain Layer And ViewModels

Build a cross-platform iOS and Android app using the Jetpack Compose API with a single codebase

Yanneck Reiß
8 min readAug 26, 2023

In this article series, we build a fully cross-platform mobile app with Kotlin Multiplatform (KMP) in combination with Compose Multiplatform for iOS.

In the previous part, we saw how to set up dependency injection and our database. In this part, we go one step further to the domain layer and set up our use cases, proceed to the UI or application layer, and set up our view models that will later connect our Compose Multiplatform UI code with the business logic.

Below, you can find the table of contents for this article series.

  1. Introduction
  2. Dependency Injection and Database
  3. Use Cases and view models (you are here)
  4. Navigation system and Compose Multiplatform UI code

1 Creating Our Use Cases

As discussed in the previous articles, we have two cases for business logic. One is for creating a new note on the “Create Note” screen, and one is for…

--

--

Yanneck Reiß

Follow me on my journey as a professional mobile and fullstack developer