News for hackers. Stuff that matters.

maddalax

Re:The Future of Htmx on Tuesday January 07, 2025 @01:11PM (#42625408)
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

Re:Ask HN: What Are You Working On? (October 2024) on Monday October 28, 2024 @12:52PM (#41973324)
Right now I'm working on https://htmgo.dev

Show HN: htmgo.dev – build simple and scalable systems with golang and htmx

https://htmgo.dev?src=hn

Hey HN,I’ve been working on a new project called htmgo, a lightweight tool that lets you build functional web apps in Go with minimal javascript by utilizing htmx.I wouldn't consider it as just a small htmx wrapper, as it has additional features to make building web applications easier than just what raw htmx has.The framework is still in alpha, but getting closer to a stable release.Check out...

( Read More... | 2 comments | on HN )
Re:Building a Single-Page App with Htmx on Monday October 07, 2024 @04:58PM (#41770968)
Mostly just thinking that XHR to mutate (form submissions, etc) and then SSE to send the updated DOM elements would be a good combo
Re:Building a Single-Page App with Htmx on Monday October 07, 2024 @04:49PM (#41770892)
Sorry yes I meant SSE, mistyped!
Re:Building a Single-Page App with Htmx on Monday October 07, 2024 @04:17PM (#41770553)
why websockets and not just SSE + XHR? Or even just XHR

Edit: SSE*

Re:Building a Single-Page App with Htmx on Monday October 07, 2024 @04:12PM (#41770476)
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

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
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
What makes you believe the prefix can’t be omitted in htmgo? You just alias it the same way with a ‘.’
This is very cool, I like the website too
that looks nice, I've enjoyed Kotlin when I used it in the past
yaegi is very interesting... I'm going to see if I can get it working on htmgo for reloading the views.
Also depending on popularity, I may make other adapters for different go web frameworks
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.

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.

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.
Awesome, yeah those are pretty nice technologies. Definitely let me know if you do / encounter any issues!
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

someone decided to ddos it with profanity so I'm pushing an update now so its not global viewable anymore.
lol looks like I forgot to limit the user input length, clearing those now…
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
Hey all, I just wanted to share a project I've been working on for the past month.

After years of heavy frameworks, I really like the idea of using htmx, but it’s a little too low level for me and needs a thin layer above it to facilitate things like components, better syntax with complex JS inside of an attribute, etc

To try and solve this problem with a very minimal stack (golang + htmx) that I've been really enjoying, I'm building this project to cater to my needs and was thinking it would be useful for other developers.