Hacker News new | ask | show | jobs
by southerntofu 1601 days ago
This is the problem with the modern web, which has become an app distribution platform. When you treat the browser as an OS, you need to expose a lot of information for stuff to work.

It would be very interesting to develop a modern web based purely on declarative content (modern HTML/CSS). HTMX is an interesting take on this, although it's currently implemented as server-provided JS: i don't see a reason why such patterns couldn't be implemented by the browser itself.

5 comments

> It would be very interesting to develop a modern web based purely on declarative content (modern HTML/CSS).

For sure. I think some scripting could also potentially be implementable without massive fingerprinting / privacy implications. E.g. pure compute scripts, form validation, etc. that has no practical way to smuggle any data out of your browser. Anything that sends a request would have to be statically derived (or explicit user input as into form).

Functional data pipelines without side-effects could do the trick indeed. It would also make it a lot easier to debug for performance issues, and the browser could be more clever about optimizations: for example if you've got a loop changing DOM elements, maybe you could wait for the loop to finish before starting a re-render... something that's impossible to do with JS-based rendering where global page state may change under your feet at any given time.

EDIT: Just for the sake of mentioning, simple/obvious computations for interactivity was the promise of GNU's libreJS project. I'm unaware of the current state of it, though.

But why zoom level? Set that locally after the site sends the info.
> It would be very interesting to develop a modern web based purely on declarative content

Is not that the subset of the web that would work when javascript is disabled? Some already develop it in that direction - what is not declarative shall be unnecessary. Or are you suggesting something different?

The problem is the declarativeness of the web is very much limited for UI/UX purposes. There's been good steps taken with HTML5, although dropping XML-compliance was in my view a major mistake in terms of operability/simplicity.

I don't understand why we need to have dozens of CSS frameworks for "components" that have become common practice across the ecosystem. Pagination, "Hero" elements, intra-page tabs, breadcrumbs (and many others) should be HTML standard so that it's more accessible and users can come up with their own stylesheets. The breadcrumbs for example would enable your browser UI to show a "go up" button like your file browser does. Another interesting example would be element filtering: why can't a <form> with a local action property (like "#data") be used to filter a list of elements without JS?

As long as most UI of a page is dictated by dozens of piled-upon CSS hacks, user stylesheets will remain a wild dream. But given how little variety there is on the web these days, many things could be standardized part of the HTML spec so that CSS is only needed for customization (eg. colors, spacing) on simpler pages, while retaining the possibility for the server to suggest more complex CSS UIs as we currently do if you absolutely want to do that.

> It would be very interesting to develop a modern web based purely on declarative content.

There is something like that, the Gemini protocol.

If you're talking about the gemtext format, unfortunately beyond titles, list, blockquotes, preformatted texts, and links, nothing else has been standardized.

I understand the appeal of simplicity but if you ask me that's a huge step backwards compared to HTML5. No <form>, no <section>/<article... It's like markdown but with another syntax :-/

i would very much like for htmx to not have to exist and just have the functionality subsumed into the HTML spec

it wouldn't be much work

Hey thanks for taking the time to reply. Have you maybe got in touch with hacker-friendly browsers such as nyxt? There may be some interested people over there.

Also, is there some good venues to discuss the semantic/declarative web with you htmx folks and hopefully people from other like-minded projects? IRC? XMPP? Matrix?

Sorry for the delayed reponse: nope, never talked w/ the nyxt folks. I tried to post a topic on the working group thingie but they, understandably, weren't very receptive.

We use discord for chat right now:

https://htmx.org/discord

Well the good thing about nyxt is it's super extensible so a PoC doesn't require proper "reception" on their side.

Do you maybe have a gateway/bridge to a libre network such as IRC/XMPP/Matrix? I find HTMX pretty interesting but i wouldn't touch discord with a 10-foot pole, if only because my limited computing resources won't allow for such a resource-hungry app to run in the background.

It seems like matterbridge supports discord backend but i don't have a discord account to try it with. If you're not willing to host matterbridge, i'm already hosting one and i would just need credentials to try and connect it to Discord. If you're willing to give that a try, feel free to mail me at my username @ thunix.net.

https://github.com/42wim/matterbridge