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

Kotlin Server Side development

Nevin
October 04, 2019

Kotlin Server Side development

The same talk was given in Android Taipei 2019-9-24
This slide is updated for JCConf 2019 on 2019-10-4

Nevin

October 04, 2019
Tweet

More Decks by Nevin

Other Decks in Programming

Transcript

  1. Ktor • Easy to Learn • Easy to Use •

    Client + Server • Features / Middleware • OAuth 2 - Firefox Account • Nice Architecture • Routing + Controller
  2. Firefox Account • Internal only— Coming soon! API DOC •

    OAuth 2.0 (authentication grand type) • authorization • token • profile
  3. Google App Engine • Build highly scalable applications on a

    fully managed serverless platform • Java 8 + Jetty9 • Java 11 (Beta)+Netty • Sample: Mobile app backend services
  4. Google App Engine • Build highly scalable applications on a

    fully managed serverless platform • Java 8 + Jetty9 • Java 11 (Beta)+Netty • Sample: Mobile app backend services
  5. Ktor Good Read • Mobile Backends (IO 2019)
 https://www.youtube.com/watch? v=zjWOMBdPbsI&t=517s

    • KotlinConf Ryan Harter 
 https://www.youtube.com/watch?v=V4PS3IjIzlw
  6. • Don’t make exception a part of your business logic

    • Don’t abuse GlobalExceptionHandler • Use standard Exception • Kotlin doesn’t have checked exception • Cleaner code • Need to look into library method that throws Exception Handling[link]
  7. Exception Handling • Don’t make exception a part of your

    business logic • Don’t abuse GlobalExceptionHandler • Use standard Exception • Kotlin doesn’t have checked exception • Cleaner code • Need to look into library method that throws
  8. Armeria • HTTP/2 RPC/REST client/ server library • built on

    top of Java 8, Netty, Thrift and gRPC https://www.youtube.com/ watch?v=hLlctum1pIA
  9. Take away • Ktor • Introduction • Request / Respond

    • Features • Firefox Account • Architecture • Deploy to Google App Engine • Backend development for Android dev • Exception Handling • Annotation Use-site Targets • Final / Nullable • Spring / Armeria / Ktor
  10. Suggestions… • Use Ktor GAE samples • Use Groovy Gradle

    build script for now • Be careful fo Intellij 2019.2 (don’t touch offline mode!)