Categories
Architecture Development Tech Web

Full stack development with KTor and HTMX ❤️

Sometimes it feels like I have been yak shaving for the last 20 years. Well, not entirely. But things like Rules Engines, SOA, App Servers and debugging Hibernate comes to mind. 😉

On the back end, things have gotten better over time. But on the front end it, feels a bit like it is history repeating. While it is impressive what you can do in React. React and all the accompanying tools is too complex for many normal web applications.

So when I discovered HTMX it really tickled my interest to see how I could combine this into an efficient development flow. Back to basics. Hypermedia and HTML. 🙂

And I think I have a pretty decent starting point in the Github repo linked below. 🙂

A full stack environment with Kotlin, KTor and HTMX. Everything loaded, compiled and packaged with Gradle. Compile in IDEA to see the changes full stack.

The following repo contains a running example (just do ./gradlew run to test it) and a semi-detailed Readme: https://github.com/anderssv/kotlin-htmx/blob/main/Readme.md

You can try the “application” here (initial load might be a little slow as it is on free fly.io which suspends inactive processes): https://kotlin-htmx.fly.dev/

This holds real promise, and I hope I get to work with this for real in production soon. 🙂

Thoughts? 🙂

After doing this I discovered that there is a similar example linked directly from the HTMX site. Nice one 🙂 https://github.com/Rattlyy/htmx-ktor/tree/master


Subscribe for more:

Categories
Development Tech

Reduced complexity with HTMX on the front end?

I recently stumbled upon HTMX and found the concepts really interesting. Many front ends does not have to be a SPA, and I think HTMX can be a really simple and efficient tool for many of the pages that I make. Even quite close to SPA in dynamic behaviour.

I have been playing around with KTor, TailwindCSS and HTMX and it is a really powerful combination. I will share some more details on that stack in a different post later. 🙂

There is a free book online. It is worth a read. I even picked up some new things about HTTP. You can find it here: https://hypermedia.systems/book/contents/

Anyway, check it out and let me know what you think.

Subscribe below for updates.