Ktor 3.2 Adds HTMX Support
Written by Mike James   
Thursday, 26 June 2025

Ktor 3.2 has been released with new modules for dependency injection and HTMX. This version also adds support for Gradle version catalogs. 

Ktor is a free open-source Kotlin framework for building asynchronous servers and clients in connected systems. It was created by the JetBrains Kotlin team using Kotlin and co-routines. This enables it to express complex asynchronous constructs as if they were simple sequential code. It also has the Kotlin advantages of being lightweight and flexible.

ktorbanner

This release has two new modules, for dependency injection and HTMX. JetBrains says the support for dependency injection (DI) was highly requested by the community. In DI, objects receive their dependencies from an external source rather than creating them internally. The optional Ktor module automatically closes AutoCloseable instances or allows you to configure your own cleanup handlers.

As the name suggests, the new HTMX module adds support for the HTMX library. This open-source JavaScript library is gaining in popularity. It extends HTML with custom attributes that enable the use of AJAX directly in HTML. The Ktor module includes tight integration with kotlinx.html and the Ktor Routing DSL. This allows you to more easily define HTML attributes for HTMX and define routes that automatically include HTMX headers.

Unix domain socket support for CIO has also been added to this version, providing more efficient bidirectional communication between processes on the same system. 

Ktor now exports a version catalog, just as it does a Maven BOM. The team says the addition was made because version catalogs have become the standard for managing dependencies and their versions in Gradle, providing a way to reference dependencies in a type-safe way from Gradle scripts and manage dependencies in a single location. Another addition means Ktor now automatically deserializes configuration files into data classes, in addition to primitive types.

Ktor 3.2 is available now. 

ktorsq

  • Mike James is the author of Programmers Guide To Kotlin, 2nd Ed written for Java programmers, Android developers and programmers wanting to discover why Kotlin is a better Java.

More Information

Ktor Website

Related Articles

Kotlin Ktor Improves Client-Server Support

Kotlin Async Ktor 2.0 Released

The Programmers Guide To Kotlin - Coroutines 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Perl 5.42 Released - Still Going Strong
09/07/2025

Just hot out of the oven, there's a new minor version release of the venerable programming language that is Perl.



pg_disatch - Run SQL Queries Asynchronously On PostgreSQL
24/06/2025

pg_disatch is meant to be a TLE-compliant alternative to pg_later but built on top of pg_cron. What makes it different?


More News

pico book

 

Comments




or email your comment to: comments@i-programmer.info