Upgrade to Pro — share decks privately, control downloads, hide ads and more …

KMM Kickstart For Android Developers

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

KMM Kickstart For Android Developers

Overview of the KMM ecosystem for Android developers. We're hiring and training folks, so pushed the basics into a bunch of slides. https://touchlab.co/careers-3/

Avatar for Kevin Galligan

Kevin Galligan

May 05, 2021
Tweet

More Decks by Kevin Galligan

Other Decks in Technology

Transcript

  1. We’ll Cover • Overview of KMP/KM M • Status/future of

    the tec h • KaMP Ki t • Architecture Thought s • Tool s • Next Steps
  2. Common JVM JS Native iOS Mac Linux Windows Android/NDK Wasm

    Others… Java-6 Java-8 Android Browser Node Typescript(?)
  3. KMM •is mostly a branding designation (it’s still KMP )

    •has a dedicated website and docs to help get starte d •has an Android Studio plugin built just for mobile (ish)
  4. kot·lin mul·ti·plat·form /ˌkätˈlin məltiˈplatfôrm,ˌkätˈlin məltīˈplatfôrm/ noun noun: kotlin multiplatform 1.optional,

    natively-integrated, open-source, code sharing platform, based on the popular, modern language kotlin. facilitates non-ui logic availability on many platforms.
  5. kot·lin mul·ti·plat·form /ˌkätˈlin məltiˈplatfôrm,ˌkätˈlin məltīˈplatfôrm/ noun noun: kotlin multiplatform 1.optional,

    natively-integrated, open-source, code sharing platform, based on the popular, modern language kotlin. facilitates non-ui logic availability on many platforms. Oh, and JetBrains!
  6. https://kotlinlang.org/docs/mobile/kmm-evolution.html Kotlin/JVM Stable Kotlin/Native Runtime Beta Multiplatform Gradle plugin Beta

    Kotlin/Native interop with C and Objective C Beta CocoaPods integration Beta Multiplatform IDE support Alpha KMM plugin for Android Studio Experimental
  7. Libraries • SQLDelight (DB ) • Ktor (Networking ) •

    Kotlinx.Serialization (Json ) • Kotlinx.Coroutines (Async/ Concurrency) • Kermit (logging ) • Multiplatform Settings (Key/Value ) • Stately (K/N Concurrency ) • Koin (DI/not-DI?)
  8. CREATE TABLE Breed ( id INTEGER NOT NULL PRIMARY KEY

    AUTOINCREMENT, name TEXT NOT NULL UNIQUE, favorite INTEGER NOT NULL DEFAULT 0 ); selectAll: SELECT * FROM Breed; selectById: SELECT * FROM Breed WHERE id = ?; selectByName: SELECT * FROM Breed WHERE name = ?; insertBreed: INSERT OR IGNORE INTO Breed(id, name) VALUES (?,?); deleteAll: DELETE FROM Breed; updateFavorite: UPDATE Breed SET favorite = ? WHERE id = ?;
  9. public data class Breed( public val id: Long, public val

    name: String, public val favorite: Long ) { public override fun toString(): String = """ |Breed [ | id: $id | name: $name | favorite: $favorite |] """.trimMargin() }
  10. public interface TableQueries : Transacter { public fun <T :

    Any> selectAll(mapper: ( id: Long, name: String, favorite: Long ) -> T): Query<T> public fun selectAll(): Query<Breed> public fun <T : Any> selectById(id: Long, mapper: ( id: Long, name: String, favorite: Long ) -> T): Query<T> public fun selectById(id: Long): Query<Breed> public fun <T : Any> selectByName(name: String, mapper: ( id: Long, name: String, favorite: Long ) -> T): Query<T> //Yada yada }
  11. KaMP Kit Docs • More on Concurrenc y • “Selling”

    to your tea m • Some info on integrating with existing project s • Other assorted docs