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

All About KotlinConf 2019

Ivan
December 13, 2019

All About KotlinConf 2019

Ivan

December 13, 2019
Tweet

More Decks by Ivan

Other Decks in Technology

Transcript

  1. What is KotlinConf? KotlinConf is a conference, providing deep-dive technical

    content on Kotlin. 3 Playlist: https://www.youtube.com/watch?v=Lv5WcWNIDrw&list=PLQ176FUIyIUY6SKGl3Cj9yeYibBuRr3Hl
  2. 5

  3. 7

  4. 8

  5. 9

  6. 10

  7. 11

  8. 12

  9. 13

  10. Topics ⦁ Mutliplatform ⦁ Kotlin/Native ⦁ Kotlin/JS ⦁ Ktor ⦁

    Jetpack Compose 15 ⦁ Coroutines ⦁ Flow ⦁ New product ⦁ Space Space: https://www.jetbrains.com/space/
  11. Kotlin 16 ⦁ New compiler ⦁ Fast, uniform, and pluggable

    Source: Opening Keynote - Andrey Breslav ⦁ Compiler plugins ⦁ Write something to extend or enhance functionality of Kotlin
  12. Kotlin 17 fun interface Action { fun run() } fun

    runAction(a: Action) = a.run() runAction { println("Hello, KotlinConf!") } Source: Opening Keynote - Andrey Breslav https://youtrack.jetbrains.com/issue/KT-7770
  13. What’s more? 18 ⦁ Library author’s mode ⦁ Explicit visibility

    ⦁ Explicit public types ⦁ Dokka ⦁ Doc generation tool ⦁ Run/Debug iOS Kotlin Apps in Android Studio Source: Opening Keynote - Andrey Breslav
  14. Kotlin/Native 19 ⦁ Performance improvement ⦁ Support for tvOS and

    watchOS ⦁ Kotlin Locator (demo) Source: Opening Keynote - Andrey Breslav
  15. Kotlin/JS 20 ⦁ Quick autoreload ⦁ Smaller JS binary size

    ⦁ ES modules ⦁ NPM dependencies Source: Opening Keynote - Andrey Breslav
  16. Writing Better Kotlin 21 ⦁ Readability ⦁ Reusability ⦁ Maintainability

    ⦁ Intentionality Source: Putting down the Golden Hammer - Huyen Dao
  17. Writing Better Kotlin ⦁ Type inference ⦁ Do not nest

    scope functions ⦁ Implicit parameter: `it` ⦁ Nullability ⦁ !! operator ⦁ Platform type: ! ⦁ Safe operator -> silently fail ⦁ Use !! if you are sure it’s not null 22 Source: Putting down the Golden Hammer - Huyen Dao
  18. Jetpack Compose ⦁ Still in developer preview ⦁ In Compose,

    everything is function ⦁ Composable function ⦁ Composition over inheritance ⦁ Uppercase naming function (top-level) 23 Source: Compose Yourself: Designing A Kotlin First UI Toolkit @Composable fun Checkbox(...)
  19. Jetpack Compose ⦁ Single source of truth 24 Source: Compose

    Yourself: Designing A Kotlin First UI Toolkit @Override public boolean performClick() { setChecked(!mChecked); final boolean handled = super.performClick(); ... }
  20. Jetpack Compose ⦁ Single source of truth 25 Source: Compose

    Yourself: Designing A Kotlin First UI Toolkit @Composable fun Checkbox( checked: Boolean, onCheckedChange: ((Boolean) -> Unit)?, ... )
  21. Jetpack Compose ⦁ Properties down, events up 26 Source: Compose

    Yourself: Designing A Kotlin First UI Toolkit @Composable fun SettingsScreen(settings: SettingsStore) { Row { Text("Very important setting") Checkbox( checked = settings.isVeryImportant, onCheckedChange = { settings.updateVeryImportant(it) } ) } }
  22. Jetpack Compose ⦁ Parameter explosion ⦁ Slot API 27 Source:

    Compose Yourself: Designing A Kotlin First UI Toolkit @Composable fun Button( text: String, onClick: (() -> Unit)? = null, style: ButtonStyle = ContainedButtonStyle(), children: @Composable () -> Unit )
  23. “ Trust your intuition Empower your people Innovate Adapt and

    thrive Tell stories But most of all… 29 Source: The Shuttle Case - Stephen Carver Have fun!!