© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
A. LilleaasPro Kotlin Web Apps from Scratchhttps://doi.org/10.1007/978-1-4842-9057-6_4

4. Decoupling Web Handlers from Specific Libraries

August Lilleaas1  
(1)
Oslo, Norway
 

As your application grows, you’ll have hundreds or even thousands of individual web handlers, for different combinations of HTTP verbs and URL paths. The purpose of these handlers is to run different pieces of business logic. In this chapter, you’ll learn how to uncouple your business logic and web handlers from Ktor, so that you can use them in any context.

In later chapters, you’ll run your web handlers in many different environments, not just Ktor. Uncoupling your web handlers from Ktor ...

Get Pro Kotlin Web Apps from Scratch: Building Production-Ready Web Apps Without a Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.