Slide 1

Slide 1 text

1

Slide 2

Slide 2 text

2

Slide 3

Slide 3 text

Etat des lieux de l'écosystème de Kotlin - 3

Slide 4

Slide 4 text

Yassine Benabbas DevRel, Enseignant Lille Android User Group @yostane in/benabbasyassine - 4

Slide 5

Slide 5 text

- 5 blog.worldline.tech @TechAtWorldline

Slide 6

Slide 6 text

Agenda 6 Langage KMP Dev Front Dev Back Data Science

Slide 7

Slide 7 text

Langage 7

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

youtrack.jetbrains.com/issue/KT-43871 Litéraux de collections (en discussion) - 9

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

Kotlin Multiplatform (KMP) 11

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

13 Donc Kotlin a un compilateur fullstack !

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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)

Slide 18

Slide 18 text

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)

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

Compiler backend Kotlin/ JVM Kotlin/ JS Kotlin/ Native Kotlin/ Wasm iOS Desktop Browser Android Backend Data science Compiler frontend Outillage Librairies 21 Code multiplatformes

Slide 22

Slide 22 text

22 KMP: structure

Slide 23

Slide 23 text

23

Slide 24

Slide 24 text

24 Un monorepo … Comment !

Slide 25

Slide 25 text

KMP : implémentations spécifiques expect fun getPlatform(): String - 25

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

- 27

Slide 28

Slide 28 text

KMP: modes d’intégration - 28

Slide 29

Slide 29 text

Développement Frontend 29

Slide 30

Slide 30 text

Plusieurs choix JVM Pure Kotlin Kotlin/JS - WASM Compose JavaFx React Exemple 30

Slide 31

Slide 31 text

??? 31

Slide 32

Slide 32 text

JafaFx + KtFX 32

Slide 33

Slide 33 text

@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

Slide 34

Slide 34 text

???? Fait intéressant 34 SwingX Romain Guy

Slide 35

Slide 35 text

- 35

Slide 36

Slide 36 text

wrl.li/quizapp 36

Slide 37

Slide 37 text

DEMO TIME KMP + compose 37

Slide 38

Slide 38 text

Développement backend 38

Slide 39

Slide 39 text

Plusieurs choix JVM Pure Kotlin Kotlin/JS - WASM Examples 39

Slide 40

Slide 40 text

DSL restassured DSL de test + nommage des fonctions avec des phrases - 40

Slide 41

Slide 41 text

ExpressJS En Kotlin - 41

Slide 42

Slide 42 text

Ktor server Par JetBrains • Gratuit et open source • Usage de DSLs • Fonctionnalités de base • Plugins - 42

Slide 43

Slide 43 text

- 43

Slide 44

Slide 44 text

- 44

Slide 45

Slide 45 text

- 45 https://wrl.li/ktorserverdemo

Slide 46

Slide 46 text

Etudes de cas https://kotlinlang.org/lp/server-side/case-studies 46

Slide 47

Slide 47 text

Data science 47

Slide 48

Slide 48 text

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

Slide 49

Slide 49 text

Librairies essentielles Kandy Dataframe 49

Slide 50

Slide 50 text

50

Slide 51

Slide 51 text

51

Slide 52

Slide 52 text

52

Slide 53

Slide 53 text

53 https://wrl.li/kandystats

Slide 54

Slide 54 text

54

Slide 55

Slide 55 text

55

Slide 56

Slide 56 text

- 56 https://wrl.li/kotlindatasciencedemo

Slide 57

Slide 57 text

Conclusion 57

Slide 58

Slide 58 text

Kotlin en 2024 Back Data science Front Infra, Scripting, Gradle, … 58

Slide 59

Slide 59 text

Kotlin en 2024 Back Data science Front Infra, Scripting, Gradle, … 59 Fondation Kotlin

Slide 60

Slide 60 text

• Frontend : Compose, JavaFx • Backend : Ktor, Spring, Quarkus • Datascience : jupyter notebooks + libs • Kotlin est interopérable avec Java 60 Kotlin est universel

Slide 61

Slide 61 text

Kotlin training KMP training Merci pour votre attention Des questions ? 61 Diapos