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

Code sharing with Kotlin multi-platform

Code sharing with Kotlin multi-platform

One IOS app, one android app and one web app. Three clients, three code bases implementing the same features (almost) and with three times the amount of bugs.
Not that bad. we are all doing it for years. But more and more companies are trying to unify the clients.
The kotlin's team came up with a solution that is for me the scenario with the less trade-offs. Use the tools you love but share what what is common.

Souleymane Sidibe

April 24, 2020
Tweet

More Decks by Souleymane Sidibe

Other Decks in Programming

Transcript

  1. Client Side development Android IOS Web UI IO UI UI

    IO IO Busines Busines Busines • 1 set of features • 3 teams / plate-forms supported • 3 Codebases/implementations • 3x the amount of issues
  2. Client Side development • Fast to build apps • Hot

    Reload • Easy to learn • Js Ecosystem • New programming language • It’s not native
  3. Android IOS Web UI BUSINESS LOGIC IO Kotlin Multiplatform •

    Modern Programming language by Jetbrains • Concise, Safe, Interoperable • Great tooling • Server side • Android default language • Kotlin Native (Windows, Mac, IOS, Linux, WA) • Web development (react, node js, etc)
  4. Android IOS Web UI BUSINESS LOGIC IO Kotlin Multiplatform •

    Sharing Code Between Platforms Kotlin Common K otlin/JV M K otlin/JS Kotlin/Native ByteCode JS C ode Native Code
  5. Android IOS Web UI BUSINESS LOGIC IO Kotlin Multiplatform •

    Sharing Code Between Platforms Kotlin Common K otlin/JV M K otlin/JS Kotlin/Native ByteCode JS C ode Native Code
  6. Android IOS Web UI BUSINESS LOGIC IO Kotlin Multiplatform •

    Sharing Code Between Platforms Kotlin Common K otlin/JV M K otlin/JS Kotlin/Native ByteCode JS C ode Native Code UI UI
  7. Android IOS Web UI SPECIFIC CODE (if Needed) Kotlin Multiplatform

    • Sharing Code Between Platforms Kotlin Common K otlin/JV M K otlin/JS Kotlin/Native ByteCode JS C ode Native Code UI UI BUSINESS LOGIC IO
  8. Android IOS Web Native UI Jetpack Compose SPECIFIC CODE (if

    Needed) Kotlin Multiplatform: Sharing Code Between Platforms • Sharing Code Between Platforms Kotlin Common K otlin/JV M K otlin/JS Kotlin/Native ByteCode JS C ode Native Code SWIFT UI, Objectif-C JS BUSINESS LOGIC IO
  9. Android IOS Web Native UI Jetpack Compose SPECIFIC CODE (if

    Needed) Kotlin Multiplatform: Sharing Code Between Platforms • Sharing Code Between Platforms Kotlin Common K otlin/JV M K otlin/JS Kotlin/Native ByteCode JS C ode Native Code SWIFT UI, Objectif-C JS BUSINESS LOGIC IO .aar .jar .framework optimized js
  10. Android IOS Web Native UI Jetpack Compose SPECIFIC CODE (if

    Needed) Kotlin Multiplatform: Sharing Code Between Platforms SWIFT UI, Objectif-C JS BUSINESS LOGIC IO
  11. Android IOS Web Native UI Jetpack Compose SPECIFIC CODE (if

    Needed) Kotlin Multiplatform: Sharing Code Between Platforms SWIFT UI, Objectif-C JS BUSINESS LOGIC IO
  12. Android IOS Web Native UI Jetpack Compose SPECIFIC CODE (if

    Needed) Kotlin Multiplatform: Sharing Code Between Platforms SWIFT UI, Objectif-C JS BUSINESS LOGIC IO
  13. Android IOS Web Native UI Jetpack Compose SPECIFIC CODE (if

    Needed) Kotlin Multiplatform: Sharing Code Between Platforms SWIFT UI, Objectif-C JS BUSINESS LOGIC IO • Gradle build tool
  14. Android IOS Web Native UI Jetpack Compose SPECIFIC CODE (if

    Needed) Kotlin Multiplatform: Sharing Code Between Platforms SWIFT UI, Objectif-C JS BUSINESS LOGIC IO • Gradle build tool
  15. Android IOS Web Native UI Jetpack Compose SPECIFIC CODE (if

    Needed) Kotlin Multiplatform: Sharing Code Between Platforms SWIFT UI, Objectif-C JS BUSINESS LOGIC IO • Gradle build tool
  16. Android IOS Web Native UI Jetpack Compose SPECIFIC CODE (if

    Needed) Kotlin Multiplatform: Sharing Code Between Platforms SWIFT UI, Objectif-C JS BUSINESS LOGIC IO • Gradle build tool
  17. Android IOS Web Native UI Jetpack Compose SPECIFIC CODE (if

    Needed) Kotlin Multiplatform: Sharing Code Between Platforms SWIFT UI, Objectif-C JS BUSINESS LOGIC IO • Gradle build tool
  18. Android IOS Web Native UI Jetpack Compose SPECIFIC CODE (if

    Needed) Kotlin Multiplatform: Sharing Code Between Platforms SWIFT UI, Objectif-C JS BUSINESS LOGIC IO • Gradle build tool StdLib Coroutines Serialization IO Date Doc
  19. Wrap up •Kotlin is a great programming language •Jetbrains is

    a great tooling company •Business logic writes once and runs everywhere
  20. Wrap up •Kotlin is a great programming language •Jetbrains is

    a great tooling company •Business logic writes once and runs everywhere •Code sharing force you re-think your architecture
  21. Wrap up •Kotlin is a great programming language •Jetbrains is

    a great tooling company •Business logic writes once and runs everywhere •Code sharing force you re-think your architecture •Performance
  22. Wrap up •Still in experimental •Limited number of multiplatform libs

    •Not great for prototyping •Setup-build-deploy curve is tough for the firsts tries