Live data from Hacker News

Show HN: htmz – a low power tool for HTML

leanrada.com

171–180 of 256 posts

Re: Show HN: htmz – a low power tool for HTML

#171
post #115

This seems snappy from the US but I doubt someone in say NZ will have a good experience. Going back and forth between the client and the server on every interaction can result in terrible UX. Users will be happy waiting 1-2 seconds after submitting a form but waiting that much to switch a tab is not gonna fly. Plus there's internet weather etc which might result in unpredictable latencies over long distances. Yes, yo…

> Moving the data to the edge is much harder.

Which means its gonna be the same thing if you try to render on the client, since you still need a round trip for data...

Re: Show HN: htmz – a low power tool for HTML

#172
Interesting. I wrote a similar plain HTML/WebComponent-based front end for my new no-code/low-code serverless platform https://saasufy.com/

It lets you build just about any data-driven application using only a handful of declarative generic HTML components: https://github.com/Saasufy/saasufy-components?tab=readme-ov-...

I built a chat app with both group chat and private chat (with access control) using only plain HTML; only ~250 lines of HTML markup for the entire thing, no front end or back end code was used: https://github.com/Saasufy/chat-app/blob/main/index.html

You can use it here - All hosted on GitHub pages: https://saasufy.github.io/chat-app/

It would be great to add support for other front end tech like this. I kind of like HTMX (especially as it's declarative). This HTMZ looks interesting. I'd like something with a big community and more components to handle more advanced cases (e.g. higher level components like calendars).

Re: Show HN: htmz – a low power tool for HTML

#174

Earlier quoted context omitted.

If you would've told anyone in the year 2000 that it'd become standard practice to blindly execute programs sent to you by anonymous people you don't know you'd get a lecture on why that's stupid. But in 2024 it's standard accepted practice. And that standard has made it so browser developers have to literally prevent the user themselves from having control over their browser because it's too dangerous to do otherwis…

Agreed. And treat all JS engine-requiring sites like viruses that need to be executed in protected VMs.

Of course! Actually, for any website that runs JS, in my opinion, we should just automatically forward the JS execution into a virtual machine, it is horrible to allow any random website to just run code directly on our machine.

What if we built this virtual sandbox directly into the browser, that way no code could run on our machine, but all websites still work fine? That's revolutionary!

Hang on...

Re: Show HN: htmz – a low power tool for HTML

#176
post #8

Reminds me of pjax [1], except pjax works over XHR instead of an iframe and uses pushState by default to keep the back button working. [1]: https://github.com/defunkt/jquery-pjax

GitHub itself used pjax heavily and I liked those interactions far more than the newer React ones, the HTML was much more semantic for one, with middle click always being respected.

Re: Show HN: htmz – a low power tool for HTML

#177

Earlier quoted context omitted.

The use case is a fun one liner.

As a fun hack / code golf it's great. I was being tonedeaf I guess, woosh as they say. The marketing pitch on the landing page is written so well that I took it too seriously probably. I know htmx but wasn't able to see this as a parody, so my fun capabilities were failing :)

I have changed it to explicitly state within the first paragraphs that "htmz is an experiment" now. I started this as a joke but turned into a fun working solution - I myself am not sure if this is just a joke or a thing. Maybe I'll use it in some smaller projects, or maybe not!

Re: Show HN: htmz – a low power tool for HTML

#178
I wonder how feasible it is to create htmz / htmx -like lightweight library with the support for React/Vue/Stelve using web components. I agree that 90% of the use-cases you don’t need React but for the last 10%, most of us are stuck with these bloated frameworks. Astro has a similar idea but it’s working as a full framework instead of being a library. Considering the limitations with Astro, I guess the biggest bottleneck is state management.

Re: Show HN: htmz – a low power tool for HTML

#179

Interesting. I wrote a similar plain HTML/WebComponent-based front end for my new no-code/low-code serverless platform https://saasufy.com/ It lets you build just about any data-driven application using only a handful of declarative generic HTML components: https://github.com/Saasufy/saasufy-components?tab=readme-ov-... I built a chat app with both group chat and private chat (with access control) using only plain HT…

>I built a chat app with both group chat and private chat (with access control) using only plain HTML; only ~250 lines of HTML markup for the entire thing: https://github.com/Saasufy/chat-app/blob/main/index.html

I think I know what you mean, but we clearly have different definitions of "plain HTML." Mine wouldn't involve 9 javascript files. :-D

Either way, I'm interested and will check out what you made!

Re: Show HN: htmz – a low power tool for HTML

#180
Further size reduction, you don't need the `this.` on the inline event listener, so it can be: `contentWindow.location.hash` and `contentDocument.body.childNodes` instead of `this.contentWindow.location.hash` or `this.contentDocument.body.childNodes`.

This will shave another 10 bytes off the snippet :D

Post reply on HN