Kotlin is becoming a widely adopted language for Backend development with frameworks like Ktor or Spring offering first class support. In this two-day course, we will learn how to make use of the Functional Programming paradigm to write a fully-fledged RESTful API using the power of Arrow.
- Previous experience with Kotlin.
- Previous experience with Ktor / Spring / Play or any similar frameworks used to write REST services.
What you'll learn
- Project setup.
- Functional JSON serialization - deserialization using Helios.
- Writing controllers.
- Adding routes.
- Writing endpoints for all the HTTP verbs (GET/POST/PUT/PATCH/DELETE).
- Modeling our endpoints as pure suspended computations.
- Adding and consuming query parameters.
- Adding and consuming headers.
- Adding functional authentication mechanisms.
- Mapping errors to proper HTTP status codes.
- Use railway oriented programming to model code branching for our endpoint logics.
- Integrating third party libraries in a pure & safe way.
- Adding a Redis cache.
- Adding persistence by MongoDB.
- Adding metrics.
- Redirection and forwarding.
- Handling multipart requests to upload files.
- Testing our endpoints. Mocking and stubbing.
- Adding encryption.
- Versioning endpoints.
- Encoding endpoints as functional streams.
- Writing a simple functional client for our API using Ktor.