Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Ktor 101 (以 Ktor 實作 Website 範例)

652 views

Published on

受邀至 GDG Taipei 示範如何應用 Kotlin 做為後端語言,並運用 Ktor 這個 Web 框架實作一個簡單的 Blog CRUD 範例。

Published in: Internet

Ktor 101 (以 Ktor 實作 Website 範例)

  1. 1. Ktor 101 — (Shengyou Fan) GDG Taipei Kotlin Everywhere 2019/08/13
  2. 2. Copyright © 2000-2019 JetBrains s.r.o.
  3. 3. JetBrains —
  4. 4. — (IDE 10+ ) (Team Tool 4 ) (Languages 2 )
  5. 5.
  6. 6. — https://plugins.jetbrains.com
  7. 7. Kotlin — • General-purpose • Static typing • OOP + FP • Developed by JetBrains • Open Source (Apache 2.0) https://kotlinlang.org/ Kotlin https://youtu.be/hg8oYJ8Ez8s
  8. 8. Kotlin Multiplatform — Browser Kotlin/JS Server Kotlin/JVM iOS Kotlin/Native Android Kotlin/JVM
  9. 9. Kotlin — Server Database Client Kotlin/JVM
  10. 10. Ktor — https://ktor.io/ • Kotlin Framework • Asynchronous • Servers + Clients • Developed by JetBrains • Open Source (Apache 2.0)
  11. 11. — OpenJDK 8+ IntelliJ IDEA Ktor Plugin
  12. 12. OpenJDK — $ curl -s "https://get.sdkman.io" | bash $ source "$HOME/.sdkman/bin/sdkman-init.sh" $ sdk install java $ sdk list java $ sdk current java $ sdk use java <version> $ sdk default java <version> $ sdk upgrade java https://sdkman.io/
  13. 13. IntelliJ IDEA — ToolBox App
  14. 14. Ktor Plugin — Ktor Plugin Ktor
  15. 15. — Ktor CRUD • • Routing • HTML DSL • Static Content • Templating • Exposed • CRUD • Error Handling
  16. 16. Ktor Feature — Client Ktor App HTTP Server Feature Feature Feature
  17. 17. — https://github.com/shengyou/20190813-ktor-website
  18. 18. — Kotlin Ktor Redirect HTML DSL Request & Response Templating Database & CRUD Static Content Error Handling Routing
  19. 19. — Talking Kotlin http://talkingkotlin.com/ktor-with-ryan-harter/ FreeMarker https://freemarker.apache.org/docs/dgui_quickstart.htmlKtor https://ktor.io/servers/index.html KotlinConf https://youtu.be/V4PS3IjIzlw
  20. 20. Ktor 101 (Shengyou Fan) shengyou@jetbrains.com —

×