Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Related tags

Kotlin kmm-works
Overview

kmm

Kotlin Multiplatform Mobile - Intro & Workshops


What is Kotlin Multiplatform Mobile?

  • Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.
  • Kotlin Multiplatform is written using Kotlin, an open source language from the Jetbrains team.
  • The shared code written in Kotlin is compiled to different formats depending on the target platform. For Android, it is compiled to Java bytecode, whereas on iOS it is compiled to a native binary.
  • The user interface development remains in the hands of the respective platform.

Benefits

  • DRY (Don’t Repeat Yourself) - Reduced code and test duplication, while retaining the flexibility and benefits of native development.
  • Code Consistency - Variations in business logic can be reduced or eliminated completely.
  • Code Reuse - Existing Kotlin code has the potential to be migrated into the new project.

Familiarity & Community Support

  • Existing Languages - Developers can continue to write code natively using modern languages, and always have access to the latest APIs.
  • Tooling - Long term Kotlin and KMM ecosystem support and updates from Jetbrains; an industry leader in development tools and technologies.

Requirements

Getting Started

Make sure you clone the repo in advance of the workshop:

git clone https://github.com/ninehundreds/kmm-works.git

Workshop 1 - Introduction and Basic Networking


Enter the newly cloned project directory, and checkout the network starter branch:

cd kmm-works
git checkout workshop/network-starter

This workshop will introduce Kotlin Multiplatform Mobile, and review it's intended purpose and capabilities. We will also discuss its benefits, as well as drawbacks. Hands-on segments will consist of:

  1. Project Creation / Dependency Management
  2. Project Structure
  3. Networking with Ktor
    • Model and interface definitions (CRUD)
    • Service and HTTP client functions / implementation
    • Service interaction from the iOS client
    • Service interaction from the Android client
  4. Hackathon Challenge

Workshop 2 - Databases and Other Disappointments


This workshop will carry on from the previous workshop, and introduce options for persisting data locally using KMM. Hands-on segments will consist of:

  1. Implementing local persistence with SQLDelight
  2. Implementing local persistence with Realm
  3. Interacting with local persistence in the clients

Branch Reference

  • workshop/network-starter branch: consists of starter template, with ktor and serialization dependencies.
  • workshop/network-final branch: consists of basic networking example with CRUD functions.
You might also like...
Repository of a multi-platform application running the same Compose source code on all platforms
Repository of a multi-platform application running the same Compose source code on all platforms

Compose multiplatform demo demo.mov Using the same compose user interface (UI) from android on all principal platforms 🎊 🎉 App Features This is a si

🍭 GithubSearchKMM - Github Repos Search - Android - iOS - Kotlin Multiplatform Mobile using Jetpack Compose, SwiftUI, FlowRedux, Coroutines Flow, Dagger Hilt, Koin Dependency Injection, shared KMP ViewModel, Clean Architecture
🍭 GithubSearchKMM - Github Repos Search - Android - iOS - Kotlin Multiplatform Mobile using Jetpack Compose, SwiftUI, FlowRedux, Coroutines Flow, Dagger Hilt, Koin Dependency Injection, shared KMP ViewModel, Clean Architecture

GithubSearchKMM Github Repos Search - Kotlin Multiplatform Mobile using Jetpack Compose, SwiftUI, FlowRedux, Coroutines Flow, Dagger Hilt, Koin Depend

Kotlin Multiplatform Mobile + Mobile Declarative UI Framework (Jetpack Compose and SwiftUI)

Kotlin Multiplatform Mobile + Mobile Declarative UI Framework (Jetpack Compose and SwiftUI)

A simple, classic Kotlin MVI implementation based on coroutines with Android support, clean DSL and easy to understand logic

A simple, classic Kotlin MVI implementation based on coroutines with Android support, clean DSL and easy to understand logic

🧸 A multiplatform coroutine-based wrapper for popular platform-specific Redis client libraries

🧸 rekt ⚠️ WARNING! This project is experimental and may be missing essential features. Please let us know if you found any issues or have any suggest

🧸 A multiplatform coroutine-based wrapper for popular platform-specific Redis client libraries

🧸 rekt ⚠️ WARNING! This project is experimental and may be missing essential features. Please let us know if you found any issues or have any suggest

🔓 Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher.
🔓 Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher.

EasyPermissions-ktx Kotlin version of the popular googlesample/easypermissions wrapper library to simplify basic system permissions logic on Android M

Mobile client for official Nextcloud News App written as Kotlin Multiplatform Project
Mobile client for official Nextcloud News App written as Kotlin Multiplatform Project

Newsout Android and iOS mobile client for Nextcloud news App. The Android client is already available to download in the Play Store. F-Droid and Apple

PackageReferenceComparison - Do app/module dependencies that share a dependency use the same Singleton ref?
PackageReferenceComparison - Do app/module dependencies that share a dependency use the same Singleton ref?

PackageReferenceComparison Do app/module dependencies that share a dependency us

Owner
Chris Russell
Chris Russell
KMM RSS Reader: an open-source, mobile, cross-platform application built with Kotlin Multiplatform Mobile.

KMM RSS Reader This is an open-source, mobile, cross-platform application built with Kotlin Multiplatform Mobile. It's a simple RSS reader, and you ca

Kotlin 1.4k Jan 4, 2023
A Bluetooth kotlin multiplatform "Cross-Platform" library for iOS and Android

Blue-Falcon A Bluetooth "Cross Platform" Kotlin Multiplatform library for iOS, Android, MacOS, Raspberry Pi and Javascript. Bluetooth in general has t

Andrew Reed 220 Dec 28, 2022
Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.

Codename One - Cross Platform Native Apps with Java or Kotlin Codename One is a mobile first cross platform environment for Java and Kotlin developers

Codename One 1.4k Jan 9, 2023
Ethereum Web3 implementation for mobile (android & ios) Kotlin Multiplatform development

Mobile Kotlin web3 This is a Kotlin MultiPlatform library that ... Table of Contents Features Requirements Installation Usage Samples Set Up Locally C

IceRock Development 32 Aug 26, 2022
An app architecture for Kotlin/Native on Android/iOS. Use Kotlin Multiplatform Mobile.

An app architecture for Kotlin/Native on Android/iOS. Use Kotlin Multiplatform Mobile. 项目架构主要分为原生系统层、Android/iOS业务SDK层、KMM SDK层、KMM业务逻辑SDK层、iOS sdkfra

libill 4 Nov 20, 2022
Utility - The cross-platform native Kotlin command line tool template

Utility The cross-platform native Kotlin command line tool template. Usage Make

null 0 Jan 3, 2022
Location Service Manager for Kotlin Multiplatform Mobile iOS and android

Location Service Manager for Kotlin Multiplatform Mobile iOS and android Features Provides simple permission settings Dramatically reduce the amount o

LINE 55 Dec 10, 2022
Kotlin Multiplatform Mobile demo for Android and iOS - app for viewing Cat pictures

CatViewerDemo Android demo iOS demo Kotlin Multiplatform Mobile demo for Android and iOS. App for viewing Cat pictures from Cats API. This sample show

Martin Rajniak 111 Dec 18, 2022
A local storage management library for Kotlin Multiplatform Mobile iOS and android

A local storage management library for Kotlin Multiplatform Mobile iOS and android Features iOS and Android local storage in one interface Provides ge

LINE 20 Oct 30, 2022
Android Spinner Dialog Library supported on both Java and Kotlin, Use for single or multi selection of choice

SpinnerDialog Android Spinner Dialog Library, Use for single or multi selection of choice Android UI Download To include SpinnerDialog in your project

Hamza Khan 55 Sep 15, 2022