Live data from Hacker News

Htmx is part of the GitHub Accelerator

htmx.org

21–30 of 520 posts

Re: Htmx is part of the GitHub Accelerator

#21
post #5

This page made me realise I'm better off with just vanilla JS or jQuery: https://htmx.org/examples/update-other-content/ Solution 3 gave me a good laugh though.

Why the heck would you use jQuery in 2023 though?

Because it’s much cleaner, readable code than anything created since.

Re: Htmx is part of the GitHub Accelerator

#22

Earlier quoted context omitted.

My main use case will be basic UI interaction, mostly just posting or fetching data from a backend then updating the innerHTML on some element. Vanilla might be enough, but I'm keeping my options open. Also, no compilation step, so no need for npm, etc

JQuery would make sense when we didn’t have querySelector and fetch API. I can’t think of any reason to use it today on a new project, there are not advantages over vanilla.

The native API is much more verbose and less composable. It was a real lost opportunity.

Re: Htmx is part of the GitHub Accelerator

#23

It's so odd to live long enough and see the steady pipeline of "look at this much simpler way of doing web apps, just write HTML, not like the previous complex way" projects, which then turn into the previous complex way as the eyes turn towards the next "simple way of doing web apps, just write HTML...". Angular and React started this way on the frontend, while ASP and PHP started this way on the backend (of course…

ASP had some strange things where you could write what looked like a client side handler on a button and it would call a function in the server. Circa 2007 or so it seemed a to be a huge mistake because it didn’t play well with the so-called “model-view-controller” paradigm where, most importantly, the request handler could decide which view to render. (e.g. you fill out a form and if you mad a mistake it redraws the…

> Either way the code that draws the HTML fragment (both the template and any database fetching/thinking) has to be runnable in more than one context.

I'm sure it's the matter of time for isomorphic HTMX-based frameworks... but they won't degrade gracefully. but then they will, as a new feature. the circle of life!

Re: Htmx is part of the GitHub Accelerator

#26
post #5

This page made me realise I'm better off with just vanilla JS or jQuery: https://htmx.org/examples/update-other-content/ Solution 3 gave me a good laugh though.

Why the heck would you use jQuery in 2023 though?

It's a boring and battle proven tool that just works and has no use by date, by the way.

Re: Htmx is part of the GitHub Accelerator

#28
I've been a HTMX fan "since before was cool"..

Very happy for the recent attention and "success". Also enjoying the shitposting and backlash mostly from the front-end crowd who believe the Web was invented in 2013 and they "made that city". :)

I'm biased since the time Backbone.js came around, I understood part of the pain but was moderately skeptical, fast forward to React with the young energetic bros building dead simple 5 page websites with a Rube Goldberg setup of front-end frameworks, I've cashed out my tech chips and never touched those things.

Post reply on HN