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


Blender Free Game Tops Steam
18/07/2025

Blender Studio has released a free-to-play game on Steam that is designed not just to be fun to play, but as an example of what you can create in the games arena using just open source software.



Apache Arrow 21 Released
07/07/2025

Version 21 of Apache Arrow has been released, including the first official Swift implementation of the platform. Improvements to Arrow 21 include exposing gRPC in the Flight client builder and improve [ ... ]


More News

pico book

 

Comments




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