News for hackers. Stuff that matters.
Re:Htmx by jrochkind1 on Wednesday December 14, 2022 @03:16PM (#33989737)
> Also if you build stuff on top of hypermedia APIs then bye bye performance.

This is not obvious to me.

Re:Htmx by t8sr on Wednesday December 14, 2022 @03:27PM (#33989977)
This idea used to be called microformats. The premise was that you send an HTML snippet, and all the semantic attributes plus a protocol definition will let you parse it as either data or a part of the UX. It's self-documenting in the sense that, if you do it right, the snippet has clear semantic meaning.

However, it's not backward and forward compatible as either UI or data, because that was never an explicit goal of HTML. It's also much slower to process because:

1) Network IO is CPU intensive, so sending more data is worse

2) HTML is not optimized for data interchange. Parsing a protobuf is probably at least 10x faster than parsing the same data out of an HTML microformat.

Re:Htmx by yawaramin on Wednesday December 14, 2022 @10:22PM (#33994739)
Um, 'parsing...data out of an HTML microformat' sounds like a fancy way and obscure way of saying 'the browser renders HTML, something it has been optimized to the gills for'.

> Parsing a protobuf is probably at least 10x faster

Faster than a browser rendering HTML? That would be quite a feat.

Re:Htmx by t8sr on Thursday December 15, 2022 @12:36AM (#33995667)
Yes, I am implicitly assuming that eventually someone will connect to it as an API, not just to directly render the HTML but to machine-process it.