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

[TNT25] Etat des lieux de l'écosystème de Kotli...

yostane
February 07, 2025
14

[TNT25] Etat des lieux de l'écosystème de Kotlin en 2024]

yostane

February 07, 2025
Tweet

Transcript

  1. 1

  2. 2

  3. Kotlin idiomatique • Coder avec les conventions et capacités du

    langage • Par ex. : définir des fonctions getters et setters n’est pas idiomatique en Kotlin 8
  4. Et bien d’autres … 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 - 10
  5. KMP: principe 12 Compiler backend Kotlin/ JVM Kotlin/ JS Kotlin/

    Native Kotlin/ Wasm iOS Desktop Browser Android Backend Data science Compiler frontend Outillage Librairies Program.kt
  6. KMP: principe 14 Compiler backend Kotlin/ JVM Kotlin/ JS Kotlin/

    Native Kotlin/ Wasm iOS Desktop Browser Android Backend Data science Compiler frontend Outillage Librairies Program.kt
  7. Compiler backend Kotlin/ JVM Kotlin/ JS Kotlin/ Native Kotlin/ Wasm

    iOS Desktop Browser Android Backend Data science Compiler frontend Outillage Librairies 15 Code qui dépend du JDK / JVM
  8. Compiler backend Kotlin/ JVM Kotlin/ JS Kotlin/ Native Kotlin/ Wasm

    iOS Desktop Browser Android Backend Data science Compiler frontend Outillage Librairies 16 Code qui dépend du JDK / JVM
  9. Compiler backend Kotlin/ JVM Kotlin/ JS Kotlin/ Native Kotlin/ Wasm

    iOS Desktop Browser Android Backend Data science Compiler frontend Outillage Librairies 17 Code qui utilise UIKit (iOS)
  10. Compiler backend Kotlin/ JVM Kotlin/ JS Kotlin/ Native Kotlin/ Wasm

    iOS Desktop Browser Android Backend Data science Compiler frontend Outillage Librairies 18 Code qui utilise UIKit (iOS)
  11. Compiler backend Kotlin/ JVM Kotlin/ JS Kotlin/ Native Kotlin/ Wasm

    iOS Desktop Browser Android Backend Data science Compiler frontend Outillage Librairies 19 Code multiplateformes mobile
  12. Compiler backend Kotlin/ JVM Kotlin/ JS Kotlin/ Native Kotlin/ Wasm

    iOS Desktop Browser Android Backend Data science Compiler frontend Outillage Librairies 20 Code multiplateformes mobile
  13. Compiler backend Kotlin/ JVM Kotlin/ JS Kotlin/ Native Kotlin/ Wasm

    iOS Desktop Browser Android Backend Data science Compiler frontend Outillage Librairies 21 Code multiplatformes
  14. 23

  15. KMP : implémentations spécifiques actual fun getPlatform() = "Android ${android.os.Build.VERSION.SDK_INT}"

    actual fun getPlatform() = "iOS ${UIDevice.currentDevice.systemVersion}" expect fun getPlatform(): String - 26
  16. @composable fun 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(text = "A simple Quiz to discovers KMP, KMM and compose.", modifier = Modifier.padding(all = 10.dp)) Button(Text("Start the Quiz"), modifier = Modifier.padding(all = 10.dp), onClick = { } ) } } } Title 8:30 Start the Quiz Quizz A simple Quizz to discovers KMP, KMM and compose Compose multiplatform: UI déclarative Repose sur Skia et Skiko - 33
  17. Ktor server Par JetBrains • Gratuit et open source •

    Usage de DSLs • Fonctionnalités de base • Plugins - 42
  18. Jupyter Notebook • Markdown + code + sa sortie dans

    un fichier « .ipynb » • Format bien supporté: Jupyter lab, Datalore, VSCode, IntelliJ, GitHub ... • Support des langages via des Kernels (Kotlin maintenu par JetBrains) 48
  19. 50

  20. 51

  21. 52

  22. 54

  23. 55

  24. • Frontend : Compose, JavaFx • Backend : Ktor, Spring,

    Quarkus • Datascience : jupyter notebooks + libs • Kotlin est interopérable avec Java 60 Kotlin est universel