HNHacker News
TopNewBestAskShowJobs

maddalax

66 karma · joined September 25, 2024

submissionscomments
maddalax··on The Future of Htmx
I'm the creator of https://htmgo.dev and I'll say that is definitely the biggest issue I've run into with htmx. It's definitely not an overall replacement, you will have to either rebuilt the date picker from scratch in js, or find a vanilla js library

so unfortunately the major downside I see so far is it's fairly hard to find good open source vanilla js libraries for things, as most things seem to be written for react.

other examples include: - virtualized list - combobox

maddalax··on Ask HN: What Are You Working On? (October 2024)
Right now I'm working on https://htmgo.dev
maddalax··on [dead]
previous discussion: https://news.ycombinator.com/item?id=41683144
maddalax··on Building a single-page app with Htmx
Mostly just thinking that XHR to mutate (form submissions, etc) and then SSE to send the updated DOM elements would be a good combo
maddalax··on Building a single-page app with Htmx
Sorry yes I meant SSE, mistyped!
maddalax··on Building a single-page app with Htmx
why websockets and not just SSE + XHR? Or even just XHR

Edit: SSE*

maddalax··on Building a single-page app with Htmx
imo htmx is good but its a bit too low level to use directly, you sort of have to rebuild all the features frameworks like React have, such as components in your server programming language.

I'm building https://htmgo.dev to do that with go + htmx, and http://fastht.ml seems like a good contender for python

maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
I’m not quite sure what the roadmap looks like for gocomponents but it looks similar but I think it’s only filling one part of the puzzle. My plan for htmgo is to become essentially a ready to use framework for building your whole app, using very fast/lean modules, similar to Ruby on Rails, especially rails 8, and not just an HTML builder
maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
I’m on mobile at the moment so could probably give you a more detailed answer tomorrow, but check out https://htmgo.dev/docs#interactivity-events
maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
What makes you believe the prefix can’t be omitted in htmgo? You just alias it the same way with a ‘.’
maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
This is very cool, I like the website too
maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
that looks nice, I've enjoyed Kotlin when I used it in the past
maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
yaegi is very interesting... I'm going to see if I can get it working on htmgo for reloading the views.
maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
Also depending on popularity, I may make other adapters for different go web frameworks
maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
Ah good call, I should have checked for typos. Will fix, ty.

The routing uses the std lib + chi, it's fairly integrated into the html builder because the http request needs to be utilized to check specific htmx headers.

I could imagine you could use your own web framework though, since you can wrap the std lib handlers.

maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
Haha we kind of have the same vision. That's eventually what I want to turn htmgo into, something like rails, but as minimal as it can be (essentially plugins, good defaults but you can opt out).

> You could use air, but I find it still to be too slow to recompile the entire app.

At the moment I'm using fsnotify to watch file changes and restart the process immediately, so far it hasn't been too bad for live reloading. I'm hoping as long as precautions are taken to lazy load things on startup, then it would stay fairly quick.

maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
Low level in the sense that it doesn't have things you would traditionally need to build an application, such as re-usable components, conditional rendering, etc. To do that you have to wire it up with something else such as your backends templating system, alpine, etc.
maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
Awesome, yeah those are pretty nice technologies. Definitely let me know if you do / encounter any issues!
maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
Well when you put it all on one line it doesn’t look great :)

With it properly spaced out and nested, after a few days it started reading exactly like HTML to me, where I can quickly see the hiearchy

maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
someone decided to ddos it with profanity so I'm pushing an update now so its not global viewable anymore.
maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
lol looks like I forgot to limit the user input length, clearing those now…
maddalax··on Show HN: htmgo - build simple and scalable systems with golang + htmx
I do also like the idea behind templ, only issue is when I tried to use it, the DX was pretty poor on Jetbrains IDE’s. I think the LSP is broken for it