Better HN
topnewbestaskshowjobs
Log inSign up

maddalax

66 karma · joined Sep 25, 2024 (2y ago) · 26 submissions

Submissions

comment 1y ago · link · parent

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

comment 2y ago · link · parent

Right now I'm working on https://htmgo.dev

comment 2y ago · link · parent

previous discussion: https://news.ycombinator.com/item?id=41683144

comment 2y ago · link · parent

Mostly just thinking that XHR to mutate (form submissions, etc) and then SSE to send the updated DOM elements would be a good combo

comment 2y ago · link · parent

Sorry yes I meant SSE, mistyped!

comment 2y ago · link · parent

why websockets and not just SSE + XHR? Or even just XHR

Edit: SSE*

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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

comment 2y ago · link · parent

What makes you believe the prefix can’t be omitted in htmgo? You just alias it the same way with a ‘.’

comment 2y ago · link · parent

This is very cool, I like the website too

comment 2y ago · link · parent

that looks nice, I've enjoyed Kotlin when I used it in the past

comment 2y ago · link · parent

yaegi is very interesting... I'm going to see if I can get it working on htmgo for reloading the views.

comment 2y ago · link · parent

Also depending on popularity, I may make other adapters for different go web frameworks

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

Awesome, yeah those are pretty nice technologies. Definitely let me know if you do / encounter any issues!

comment 2y ago · link · parent

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

comment 2y ago · link · parent

someone decided to ddos it with profanity so I'm pushing an update now so its not global viewable anymore.

comment 2y ago · link · parent

lol looks like I forgot to limit the user input length, clearing those now…

comment 2y ago · link · parent

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

23.

Show HN: htmgo - build simple and scalable systems with golang + htmx(htmgo.dev ↗)

166 points · by maddalax · 2y ago · 81 comments