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

DroidKaigi 2024 - You will 💜 Becoming a fullsta...

DroidKaigi 2024 - You will 💜 Becoming a fullstack developer with your Android skills

Kotlin is much more than just a language; it is a complete ecosystem! From backend development to cross-platform front-end development, and even data science, it is everywhere. This is part of the DNA of Kotlin since its creation and grows exponentially especially with the latest Google IO and KotlinConf 2024.

This talk demonstrates how Android devs can easily become fullstack using their existing Kotlin skills. We will share three demos covering different stacks of development including exotic and funny ones. We will achieve all of this by keeping our favorite Jetpack libraries (such as navigation, Room and preferences datastore) and integrating new ones (such as Ktor client/server, DataFrame).

By the end of this presentation, you will be delighted to realize how easy and pleasant it is to kick-start development for other targets than Android. Indeed, in addition to iOS, desktop, web, backend, and data-science apps, even more app stacks are already in your reach.

https://2024.droidkaigi.jp/en/timetable/687445/

Ibrahim Gharbi

September 17, 2024
Tweet

Other Decks in Programming

Transcript

  1. Payments to grow your world You will Becoming a fullstack

    developer with your Android skills DroidKaigi 2024 - 1
  2. - 2 Yassine Benabbas DevRel, Teacher Lille Android User Group

    @yostane in/benabbasyassine Ibrahim Gharbi DevRel, Teacher @__brah in/Ibrahim.gharbi Lille / France
  3. What can we develop with Kotlin? - 3 Mobile Web

    Desktop Backend Data science ? …
  4. Already 13th years and a promising future ! Ecosystem milestones

    Language & Web/Desktop support - Kotlin: JVM + JS targets - Kotlin in Android Studio - KMP beta1 Mobile & Backend in the ecosystem - Coroutines - Ktor client / server 1.0 - Kotlin 1st class on Android - Jetpack compose for Android - Apple platforms interop iOS & Kotlin multiplatform - Jetpack Compose 1.0 - Compose multiplatform 1.0 (Android/Desktop) - Compose multiplatform iOS - Kotlin DSL by Default for New Gradle Builds - K2 - KMP Wizard 2011 2017 2018 2020 2021 2024
  5. - 6 Swift UI Shared UI with Compose Multiplatform UIKit

    widgets Android views Swing/AWT views WebUI Common library with Kotlin Multiplatform iOS specific Logic Android specific Logic Desktop specific Logic Web specific Logic iOS APIs Android APIs Desktop JVM/APIs WEB APIs ? Kotlin Multiplatform (KMP) ? Stable Stable Alpha Beta
  6. Keywords: Expect / Actual KMP : Architecture : specific platform

    code (2/3) specific code (UIKit) specific code (Android SDK) actual fun getPlatform(): String { "Android ${android.os.Build.VERSION.SDK_INT}" } actual fun getPlatform(): String { "iOS ${UIDevice.currentDevice.systemVersion}" } expect fun getPlatform(): String
  7. Composants Status Official or 3rd party libraries Composables Navigation Ressources/i18n

    Helped with Jetpack compose docs Navigation library multiplatform (2024) Painter-ressource, font, string ressources (2024) ViewModel View model multiplatform (2024) KMP : Architecture (3/3) Database SQLDelight, Realm, Room Database (2024) User preferences KStore, Jetpack datastore-preferences, Multiplatform-Settings Network Jetbrain Ktor Client And also o Injection : Koin o Concurrent prg : kotlinx.coroutines o Business logic components (BLoC) : Decompose
  8. - 11 Title 8:30 @composable MyComposableView(){ Box( contentAlignment = Alignment.Center,

    modifier = Modifier.fillMaxWidth().fillMaxHeight() ) { Card( shape = RoundedCornerShape(8.dp), modifier = Modifier.padding(10.dp), ) { Column(horizontalAlignment = Alignment.CenterHorizontally) { Text( text = "Quiz", fontSize = 30.sp, modifier = Modifier.padding(all = 10.dp) ) Text(modifier = Modifier.padding(all = 10.dp), text = "A simple Quiz to discovers KMP, KMM and compose.") Button( modifier = Modifier.padding(all = 10.dp), onClick = { } ) { Text("Start the Quiz")} }} } Start the Quiz Quizz A simple Quizz to discovers KMP, KMM and compose Declarative UI with Compose multiplatform Jetpack compose Skia and Skiko Behind compose multiplatform (https://github.com/JetBrains/skiko)
  9. - 15 KMP: WishList Architecture o WASM stable support on

    compose for web o BDD multiplatform support ❑ Better SQLDelight driver instantiation, WASM support ❑ Room for Web, EXPOSED support o kotlinx.coroutines : better dispatchers multiplatform support Tooling o Concise build.gradle config with Ampere o Fleet improvements ( Run config, cache, previews ) o iOS ❑ xcodebuild gradle native plugin ❑ iOS support in IntelliJ ❑ Logging improvement on iOS
  10. Ktor server By JetBrains • State of art server framework

    • Free and open source • Powerful DSLs • Plugin support - 21
  11. Jupyter Notebook • markdown + executable code + its output

    => a single « .ipynb » file • Can be executed from webapps (Jupyter lab, Datalore, ...) and IDEs (VSCode, IntelliJ, ...) • Can be rendered by many tools such as GitHub • Kernels provide language support (there is a Kotlin Kernel ) - 24
  12. Annd many more amazing features Explicit backing field Array Literals

    guards Infinite loop github.com/Kotlin/KEEP x.com/kotlin Multi-field value classes Context parameters Kotlin statics and static extensions HexFormat
  13. Fullstack Kotlin: is it time to onboard? - 38 ✓

    Achieved milestones: KMP + Kotlin 2.0 ✓Comprehensive ecosystem ✓Mature backend frameworks ✓Android devs will be delighted to be open to other platforms ( web, back, data science)