2 ms·
I encourage anyone looking to do htmx to consider Kotlin and it's excelent kotlinx-html DSL. Lets you do stuff like this: https://github.com/corlaez/kotlin-htmx
by jpgvm 3y ago
I encourage anyone looking to do htmx to consider Kotlin and it's excelent kotlinx-html DSL. Lets you do stuff like this: https://github.com/corlaez/kotlin-htmx/blob/master/src/main/kotlin/friends/html.kt https://github.com/corlaez/kotlin-htmx/blob/master/src/main/...
Disclaimer: Not my code, just an example I found.
- Neikius 3y agoThis is a lovely use of the DSL..too bad I prefer plain java.
- smallerfish 3y agoI second this. kotlinx-html is poorly documented and has a couple quirks, but is fantastic. As I've been building one of my current projects, I've also been building a framework based on jooq + kotlinx.html + javalin + htmx + flowbite (+kotlinjs for a few fancy bits, e.g. the charting library). Aside from tailwind, you end up with a fully typed and compiler-checked application end to end, i.e. no magic strings to be seen. I'm exclusively using HX-Retarget, so the backend is in charge of where things land, meaning that the frontend can do things like: div { onClick(loadItems) } I don't know whether I'll ever actually get it in good enough shape to release, but I do plan to blog about how some of the tricks I've found it fitting it together. One thing I definitely need to do before anybody looks at it is clean up how routes and targets are managed.
- hjadal 3y agoThat sounds like a lovely way to develop, what is your blog? So I can watch for your post.
- smallerfish 3y agoThanks! It's http://smaller.fish http://smaller.fish. I have a subscribe form at the bottom which I only use for new post announcements (which, as you can see, are pretty infrequent :)).
- efilife 3y agohttps://youryoure.com/?its https://youryoure.com/?its