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

Kotlin Multiplatform

Kotlin Multiplatform

Kotlin Multiplatform iOS development

Kevin Galligan

August 16, 2018
Tweet

More Decks by Kevin Galligan

Other Decks in Technology

Transcript

  1. Kotlin Multiplatform

    View full-size slide

  2. @allymcleangames

    View full-size slide

  3. • Kevin Galligan, President of Touchlab

    • I’ve been coding Android since before the G1, run a mobile
    dev shop, and since late 2015 have been largely focused
    on mobile code sharing

    • I’m going to tell you about Kotlin Multiplatform

    View full-size slide

  4. • Static “Better Java” by Jetbrains

    • 2011 - Announced

    • 2016 - v1.0

    • 2017 - Google++

    View full-size slide

  5. JVM JS Native

    View full-size slide

  6. JVM JS Native
    Common

    View full-size slide

  7. Native
    Not Native

    View full-size slide

  8. Native
    Not Native - Me(h)tal
    Not Native - Rock

    View full-size slide

  9. –Lemmy Kilmister
    “It’s Little Richard’s fault, all of it. Little Richard
    is directly responsible for Motorhead.”

    View full-size slide

  10. • Shared, testable architecture (not UI)
    • Smooth interop, optional code sharing
    • Active community
    • Good tools
    • Bonus! One platform 100% native
    K O T L I N M U L T I P L A T F O R M

    View full-size slide

  11. I Can’t See
    The Future

    View full-size slide

  12. JVM JS Native
    Common

    View full-size slide

  13. JVM JS Native
    Common

    View full-size slide

  14. JVM Native
    Common

    View full-size slide

  15. JVM Native
    Common
    Android
    Stuff
    Framework
    iOS Stuff

    View full-size slide

  16. Common mainThread?

    View full-size slide

  17. Expected a method,
    was actually there!

    View full-size slide

  18. Kotlin/Native at .9

    View full-size slide

  19. • 5 React Native

    • 3 Flutter

    • 4 Kotlin Multiplatform

    • ~20% of the content!
    Cross Platform Droidcon

    View full-size slide

  20. • Serialization

    • Ktor

    • I/O

    • Coroutines
    Jetbrains

    View full-size slide

  21. all the code
    you’ve ever
    written
    not frozen
    frozen

    View full-size slide

  22. all the code
    you’ve ever
    written
    not frozen
    frozen

    View full-size slide

  23. Frozen is
    • A special runtime state

    • Like super-immutable

    • Only way to share data between threads

    View full-size slide

  24. Data
    OtherMutable OtherShared
    Stuff MoreStuff

    View full-size slide

  25. Data
    OtherMutable OtherShared
    Stuff MoreStuff

    View full-size slide

  26. Q3
    Q2 Q4 Q1 Q2
    2018 2019
    0 .6
    v0.7
    v0.8
    v0.8.2

    View full-size slide

  27. Q3
    Q2 Q4 Q1 Q2
    2018 2019
    0 .6
    v0.7
    v0.8
    v0.8.2
    v0.9
    Coroutines
    (and other libs)

    View full-size slide

  28. Q3
    Q2 Q4 Q1 Q2
    2018 2019
    0 .6
    v0.7
    v0.8
    v0.8.2
    v0.9
    Coroutines
    (and other libs)

    View full-size slide

  29. Q3
    Q2 Q4 Q1 Q2
    2018 2019
    0 .6
    v0.7
    v0.8
    v0.8.2
    v0.9
    Coroutines
    (and other libs)

    View full-size slide

  30. Q3
    Q2 Q4 Q1 Q2
    2018 2019
    0 .6
    v0.7
    v0.8
    v0.8.2
    v0.9
    Coroutines
    (and other libs)
    v1

    View full-size slide

  31. Q3
    Q2 Q4 Q1 Q2
    2018 2019
    0 .6
    v0.7
    v0.8
    v0.8.2
    v0.9
    Coroutines
    (and other libs)
    v1
    Major reactive lib
    Date/other libs
    Improved tooling
    Faster builds

    View full-size slide

  32. Q3
    Q2 Q4 Q1 Q2
    2018 2019
    0 .6
    v0.7
    v0.8
    v0.8.2
    v0.9
    Coroutines
    (and other libs)
    v1
    Major reactive lib
    Date/other libs
    Improved tooling
    Faster builds “Mainstream”
    Big apps
    Wasm threads

    View full-size slide

  33. 2010
    ORMLite
    ActiveAndroid

    View full-size slide

  34. 2010
    ORMLite
    ActiveAndroid :P

    View full-size slide

  35. 2010
    ORMLite
    ActiveAndroid :P
    2018
    ORMLite
    SQLBright
    SQLDelight
    Storeio
    Room
    Cupboard
    SugarORM GreenDAO
    DBFlow
    Squeeky
    Ollie Requery Squidb

    View full-size slide

  36. 2018
    Knarch.db
    SQLDelight
    2025?
    MPSettings
    Jetbrains stuff

    View full-size slide

  37. [email protected]
    @kpgalligan Discount code: AndroidSummit

    View full-size slide