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

Building asynchronous API with Ktor & Kotlin - Android Worldwide

Building asynchronous API with Ktor & Kotlin - Android Worldwide

This was a slide that I use at Android Worldwide in 25/10/2022, where I covered in practice the creation of an asynchronous API in a straightforward way, using Kotlin and Ktor.

Manuel Ernesto

October 25, 2022
Tweet

More Decks by Manuel Ernesto

Other Decks in Programming

Transcript

  1. Building
    Asynchronous API
    with Ktor & Kotlin
    Manuel Ernesto
    @manuelernest0

    View full-size slide

  2. What is Ktor 🤔

    View full-size slide

  3. Lightweight and flexible framework built from scratch using Kotlin and
    Coroutine, which allows us to easily build asynchronous client and server
    applications.
    Ktor

    View full-size slide

  4. Lightweight and flexible framework built from scratch using
    Kotlin and Coroutine, which allows us to easily build asynchronous client
    and server applications.
    Ktor

    View full-size slide

  5. Lightweight and flexible framework built from scratch using Kotlin and
    Coroutine, which allows us to easily build asynchronous client and server
    applications.
    Ktor

    View full-size slide

  6. Lightweight and flexible framework built from scratch using Kotlin and
    Coroutine, which allows us to easily build asynchronous client and
    server applications.
    Ktor

    View full-size slide

  7. Lightweight and flexible framework built from scratch using Kotlin and
    Coroutine, which allows us to easily build asynchronous client and
    server applications.
    Ktor

    View full-size slide

  8. Ktor
    Application

    View full-size slide

  9. Ktor
    Application
    Tomcat

    View full-size slide

  10. Ktor
    Application
    Tomcat
    Jetty

    View full-size slide

  11. Ktor
    Application
    Tomcat
    Jetty
    Netty(default)

    View full-size slide

  12. Ktor
    Application
    Tomcat
    Jetty
    Netty(default)
    Routing

    View full-size slide

  13. Ktor
    Application
    Tomcat
    Jetty
    Netty(default)
    Routing
    Authentication

    View full-size slide

  14. Ktor
    Application
    Tomcat
    Jetty
    Netty(default)
    Routing
    Authentication
    ContentNegotiation

    View full-size slide

  15. Ktor
    Application
    Tomcat
    Jetty
    Netty(default)
    Routing
    Authentication
    Exposed
    ContentNegotiation

    View full-size slide

  16. intellij idea https://start.ktor.io

    View full-size slide

  17. intellij idea https://start.ktor.io

    View full-size slide

  18. Useful Frameworks/Lib 󰝺
    Database: https://github.com/JetBrains/Exposed
    DI: https://insert-koin.io/
    https://kosi-libs.org/kodein-di/7.12.0/index.html

    View full-size slide

  19. Resources 󰝺
    Code: https://github.com/manuelernesto/ktor-android-worldwide-demo
    Ktor: https://ktor.io/
    Kotlin: https://kotlinlang.org/
    IntelliJ IDEA: https://www.jetbrains.com/idea/
    Ktor start: https://start.ktor.io/#/settings

    View full-size slide

  20. Thanks 󰚢
    Manuel Ernesto
    @manuelernest0

    View full-size slide