Live data from Hacker News

Htmx is part of the GitHub Accelerator

htmx.org

341–350 of 520 posts

Re: Htmx is part of the GitHub Accelerator

#341

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…

>The fact your HTML barely reads like HTML after Tailwind, and reads more like your file is corrupted is I guess not mentioned in the tagline. Not my experience for the record. I use Tailwind in my side project, and it is exactly as convenient as it sounds to write my styles directly into HTML rather than think of a class name, add it in HTML, switch to the proper CSS file (or create it if it doesn't exist and make s…

I’ve messed around with tailwind a bit now, and honestly I could never use it in even a moderately complex site without some sort of “component” framework.

I think you’re talking about just serving a .html file for every page in a site right? Having all of your styles duplicated everywhere would be much more confusing than writing CSS (and having to invent one name per groups of common things.)

IMO it’s only viable if you can create your own components. Which you will also have to give a name.

Re: Htmx is part of the GitHub Accelerator

#342
post #208

Earlier quoted context omitted.

That's not my experience based on two scenarios: 1. Server-side rendered sites in Python using either Django or FastAPI/Jinja2 and htmx; 2. Dotnet back end with Angular front end. In practice - for the apps I've been involved with - option (1) provides a more than acceptable user experience. There's no doubt Angular can go beyond the capabilities of SSR+htmx. But, in practice, it's in the long tail. Throw in the odd…

Not sure you've solved the complexity when you've just slotted in another front to a general solution that is over-engineered. You could have replaced either scenarios with a single NextJS or SvelteKit solution. Go above and beyond in "complexity", write your Node backend (keeping it one language, JavaScript), and use vanilla HTML and JS to consume that. To me, htmx isn't as revolutionary as people make it out to be,…

> My history was mostly JQuery where needed (which was all the time before JS got its act together).

htmx should remind you of those times.

I certainly has for me - it's just (fundamentally) a fancy and clever wrapper around jQuery ajax requests made via HTML attributes.

Re: Htmx is part of the GitHub Accelerator

#343

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…

>The fact your HTML barely reads like HTML after Tailwind, and reads more like your file is corrupted is I guess not mentioned in the tagline. Not my experience for the record. I use Tailwind in my side project, and it is exactly as convenient as it sounds to write my styles directly into HTML rather than think of a class name, add it in HTML, switch to the proper CSS file (or create it if it doesn't exist and make s…

Is this how Tailwind is supposed to work? I've never used it, but this sounds awful. How do you keep styles consistent across different areas of a website? Do you manually write matching styles into HTML every time you need them?

Re: Htmx is part of the GitHub Accelerator

#344
post #330

hi there, as many of you know, i am the creator of htmx and I'm happy to answer any questions about it htmx has seen a surge in popularity, triggered by a video by fireship dev ( https://www.youtube.com/watch?v=r-GSGH2RxJs ) and a series of videos by ThePrimeagen, a popular twitch streamer on it hacker news readers might be interested in the essays I have written on htmx & hypermedia in general here: https://htmx.org…

How do you organize a backend for a htmx based frontend? Specifically getting templates that serve as reusable components, but also endpoints (there is some proliferation of endpoints which I remember from my days with ASP.NET MVC partials.

depends a lot on what your backend gives you

i agree it can spiral out of control if you try to do too much, e.g. a routes file that is just incomprehensible

i often end up reusing the same controller method to handle a few related routes, using pattern matching in the route declaration

i think also picking your battles and not getting too fiddly with screens that don't matter so much also helps a lot here

Re: Htmx is part of the GitHub Accelerator

#345

I started with Perl in ‘96 and have lived through what feels like everything — PHP, jQuery, Drupal, Backbone, Node, Angular, ClojureScript, React, GraphQL, and NextJS. Htmx feels like a divergence from the trend, and is worth thinking about. Htmx asks us a good question: “does the complexity of your work reside essentially on the server or essentially on the client?” The complexity for the vast majority of websites r…

> A hybrid approach is necessary. It isn’t good enough to allow compatibility. Although htmx and React can be used on the same web page, they need to be kept in isolation. But I’m not looking for isolation; I’m looking for fundamental integration.

Blazor United promises this hybrid approach. You code in C# in one way regardless of server or client. On first page load it renders everything from server-side. Then webassembly gradually takes over and it starts loading C# code on the client to speed up UI interactions that don't require server side data.

It works well but their current challenge is reducing webassembly files size which is about multiple MBs.

https://visualstudiomagazine.com/articles/2023/04/20/blazor-...

Re: Htmx is part of the GitHub Accelerator

#346

Earlier quoted context omitted.

You can get your comment deleted if you contact Hacker News, I’ve done it

I contacted them. They outright refused to delete any comments, all comments or my entire account. Hacker News by matter of policy WILL NOT delete your comments, even when requested in writing.

in your case there seem likely to be extenuating circumstances; just after posting the above you accused me of 'anti-semitic rhetoric' in https://news.ycombinator.com/item?id=37150457 for example

people who egregiously abuse the site like that may be less likely to get cooperation in concealing their abuses

Re: Htmx is part of the GitHub Accelerator

#347

hi there, as many of you know, i am the creator of htmx and I'm happy to answer any questions about it htmx has seen a surge in popularity, triggered by a video by fireship dev ( https://www.youtube.com/watch?v=r-GSGH2RxJs ) and a series of videos by ThePrimeagen, a popular twitch streamer on it hacker news readers might be interested in the essays I have written on htmx & hypermedia in general here: https://htmx.org…

This will just die like Web Components and RxJS after a few people write blog posts and do conference talks on it for hype, right? Does this work with Web Assembly? Of course Web Assembly will die too since it can't do SEO. In all seriousness though, what is the "core" reason to actually adopt this over the current approach?

if you sincerely wish to understand how htmx is different than the current SPA-talking-to-a-JSON-API approach I would start here:

https://htmx.org/essays/hypermedia-driven-applications/

and then work through the rest of the essays:

https://htmx.org/essays/

Re: Htmx is part of the GitHub Accelerator

#348

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…

:) I appreciate you being a long time user and I certainly do a lot of s-word posting on the ol' twitters

on the other hand, my hope is that eventually htmx (and, more generally, hypermedia) is accepted as a tool, a useful too, but just a tool, even by the front-end folks who haven't thought very much about hypermedia in a while

i don't see the two approaches as mutually exclusive and agree w/ Rich Harris' concept of 'Transitional' web applications that mix the two approaches. I would just draw the line where you abandon hypermedia for a more elaborate client side approach in a different place than him.

Re: Htmx is part of the GitHub Accelerator

#349
post #52

Earlier quoted context omitted.

> poorly explains what it is Seems clear to me but I've been watching this project grow for a few years now. If you read the brief introduction, motivation, and quick start on the homepage what do you think the project does? > why would you want to use something like this I would agree that part wasn't clear to me either, at least not right away. When compared to something like a SPA the state has to persist on the s…

> and quick start on the homepage what do you think the project does? It adds some special attributes to HTML that magically perform some logic and it is not clear how and why. Why would I use something like this over React? What this thing is trying to solve? > You render the HTML using the frameworks/tools/languages you fancy. HTMX provides custom attributes you can use to update content within a page without havin…

> I still can't see what's the point of it. Why would I want to do it?

It depends on how you like to build projects. If you like the current state of client-side rendering there is no point to using HTMX. If you like server-side rendering (my personal preference) then HTMX fills the gap of doing partial DOM updates without needing to reload the entire page. Some people will argue about perf metrics until they're blue in the face. I mostly rely on personal preferences.

Re: Htmx is part of the GitHub Accelerator

#350
post #293

Earlier quoted context omitted.

What are technical differences between HTMX and early versions of Angular 1? It has the same idea of sprinkling some attributes over HTML to make it dynamic for easy cases. There were many frameworks that started like this (Angular 1, Vue, etc), and after getting some traction they grew into full-blown SPA frameworks, because there is a real need for more difficult cases. If I had to pick an “Angular-1-like” framewor…

htmx uses hypermedia, rather than client-side managed state as much as possible, htmx tries to take HTML to its logical conclusion (from my perspective) as a hypermedia, rather than imposing other ideas on top of it

Does this ideology lead to significant technical differences from early versions of Angular 1 and early versions of Vue?
Post reply on HN