4 ms·
OK I reckon everyone is going to get on the HTMX wagon over the course of the next few months, and it's going to blow a ton of young minds and save a huge amoun
by pjs_ 3y ago
OK I reckon everyone is going to get on the HTMX wagon over the course of the next few months, and it's going to blow a ton of young minds and save a huge amount of global energy and make a lot of people very happy. And then these same inquisitive young people are going to click enough links on htmx.org that they stumble across hyperscript and it's gonna be like that moment in Dusk till Dawn where the vampires come out
- noman-land 3y agoSpoiler very much alert.
- squeaky-clean 3y agoIf it's in the trailer it's fair game. Besides an actual spoilery description for From Dusk til Dawn would be all the non-vampire parts. The "twist" is that a movie billed as Robert Rodriguez vampire schlock actually has an entire other movie contained in it. That's a bit of a spoiler I suppose, my bad.
- Tao3300 3y agoThe Dimension Collector's Series DVD cover has the fanged face of a vampire woman on it. If someone thinks it's ruined because they found out ahead of time that there are vampires in it... yeah, that's their problem.
- recursivedoubts 3y agolmao so true
- kirse 3y agoeveryone is going to get on the HTMX wagon This is an infinite cycle with JS though. Someone tired of JS complexity writes a simple JS lib (SJSLib), SJSLib attracts people for simplicity, SJSLib grows complex because it has to support all the web things, someone tired of SJSLib complexity writes a simple JS lib... I say this as someone who started with raw JS and fought IE5/6 for years, jQuery then saved us all, skipped over AngularJS because it was meh, React beta finally came around and loved it for FP ideals, now wade thru piles of transpiling / hot-reload / Typescript and React fat-libs. Have also written a few projects with both Intercooler (and now HTMX). HTMX is overall solid, but this ain't the first wagon to come through town.
- BD103 3y agoObligatory Vanilla JS link: http://vanilla-js.com http://vanilla-js.com
- hirvi74 3y agoPlain JS and HTMX are like Duct Tape and Spackle. I feel like I can fix/build anything I need with them.
- pphysch 3y agoHTMX is pretty much feature complete though.
- niels_bom 3y agoFamous last words.
- ketzo 3y agoWars have been won and kingdoms lost in the space between “pretty much” and “complete”
- zogrodea 3y agoTo this comment’s replies: The dev of HTMX has said and is well aware that HTMX/hypermedia-based approaches don’t work well for every type of web app, but claims that it fits well with the vast majority of them, so the chance of it becoming bloated for want of fitting every single use case is pretty low. Greg says that a developer’s most valuable weapon against the complexity demon is limiting features by saying “no”, so I think the chance is pretty minimal. So the cycle spoken of would be broken at this sentence. “SJSLib grows complex because it has to support all the web things.”
- JamesLeonis 3y ago> And then these same inquisitive young people are going to click enough links on htmx.org that they stumble across hyperscript and it's gonna be like that moment in Dusk till Dawn where the vampires come out I laughed at this, then I checked. _="on load wait 5s then transition opacity to 0 then remove me" Oh no! _="on htmx:error(errorInfo) fetch /errors {method:'POST', body:{errorInfo:errorInfo} as JSON} " Oh No!
- recursivedoubts 3y agoit gets so much worse, trust me, i created it
- jauntywundrkind 3y agoAh! Carson Gross is author of grug brained developer, and htmx! I'd love to see some real critiques of htmx. Personally I think the web's big ongoing challenge has been figuring out how to update the page well, and we keep trying all kinds of attempts. That causes fatigue, and some of the ideas are wild or grow crufty over time. Htmx seems like a back-reaction, to insist on grug brained less/YAGNI. And even though the future is uncertain, I still see work on things like signals as saintly. There's a lot of different pokers in the fire, refining & trying different angles. We're still pioneering this front, other fronts. The quest feels similar to so many others. MobX and Svelte and others have made great journeys already. That the journey is still irresolute, that we do keep tangling with the complexity beast: rather than that being a sign of weakness, as the conservative/grug minded might take it for, I think and I hope it's appropriate & due effort to reach a simple but good. Rather than a just simply simple approach.
- bredren 3y agoSome critiques focus on the developer insecurities that make them vulnerable to HTMX's charms: - Writing Vanilla JS ES6+ is not that hard, actually it is pretty fun. - Toolchain for JS/TS/CSS was bad but is pretty good now. esbuild is simple and great. - Dodging learning the above two things does not serve the dev. Others have to do with foundational aspects of the project: - HTMX is in denial of need to support native clients. IIRC, the official recommendation is that native clients should parse HTML for values. - HTMX is still just a javascript library dependency with syntax that must be learned by whoever picks up the project. IMO HTMX's buzz can largely be attributed to anti-frontend or anti modern frontend. This thread describes this idea: https://twitter.com/DanaWoodman/status/1682075711266496512 https://twitter.com/DanaWoodman/status/1682075711266496512
- ColonelPhantom 3y agoWhy would I write my own JS when "hx-get" does the job? Writing your own JS makes sense in some cases, but using HTML partials is also useful in many cases where you need to talk to the server anyways (since they e.g. prevent logic duplication). HTMX just makes it easy to work with them, as they're a single attribute away, rather than doing the request and insertion by hand. Native clients are deliberately out of scope, but scraping HTML isn't the suggested solution. Rather, it is having a JSON API next to the hypermedia API: https://htmx.org/essays/splitting-your-apis/ https://htmx.org/essays/splitting-your-apis/. This does have the downside of duplicate work, but does bring stability to the API without introducing something like GraphQL. And yes, you will need to learn HTMX to use HTMX. But the surface of HTMX is generally quite small, and composes well with knowledge about HTML/CSS.