Kotlin is becoming a widely adopted language for Backend development where frameworks like Ktor or Spring offer first class support for it. In this 2 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 writing RESTful APIs.
- Previous experience with Ktor / Spring / Play or any other frameworks of the like 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).
- Modelling our endpoints as pure suspended computations.
- Adding and consuming query parameters.
- Adding and consuming headers.
- Adding functional authentication mechanisms.
- Data validation and error handling.
- 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.