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

Google DevFest Kaohsiung 2019

Nevin
December 12, 2019

Google DevFest Kaohsiung 2019

Nevin

December 12, 2019
Tweet

More Decks by Nevin

Other Decks in Programming

Transcript

  1. Agenda • Ktor • Kotlin tips • Friends: Armeria, Spring

    • Ktor on GAE • Android -> Backend
  2. Ktor • Easy to Learn • Easy to Use •

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

    OAuth 2.0 (authentication grand type) • authorization • token • profile
  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 • UnderstandApp Engine Gradle plugin will help your deployment
  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. (Android Dev)->Backend Dev Diff Same Memory IoC Lifecycle Testing Boot

    up time Application Context Error Handling Libraries SRE / Cloud Infra
  10. 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
  11. Suggestions… • Use Ktor GAE samples • Use Groovy Gradle

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