upvote
By default LLMs will start creating a tangled hard to test mess of javascript. But if you ask them to do TDD they will, and if you give them access to Playwright and have them write playwright tests this can all work.

The advantage for the LLM is the same for humans. With the right abstractions, code can be written quicker and more robustly.

To get more hands off with LLMS you really want to have a lot of engineering rigor. A big part of that is a focus on tests. If your abstractions make testing easier, your results will be a lot better. For Javascript the more you can test logic without DOM manipulation and without playwright tests, the better.

I found LLMs to be default to and be pretty good at working with HTMX, but not great (mostly lots of state synchronization issues). The focus on DOM markup of HTMX does not lend itself well to simplifying testing. I don't claim to be an expert at HTMX, but I don't see a separate section on testing in their documentation.

I am trying out the foldkit framework because it makes a lot more testable outside the DOM. Its probably too heavy weight for most humans (and for simple apps- it only seems appropriate for client-side apps), but I will see how well LLMs can work with it.

reply
deleted
reply
There's definitely something to this: I expect LLMs to hurt the adoption of htmx and most smaller web libraries. That's fine: it's always been a labor of love and is BSD 0, so I hope the ideas are interesting and that the people who decide to use it enjoy it.
reply
It may do the opposite! My sense of LLMs is that simplicity beats training.

If you have 1/5th the context to consume, that's going to generate better code than the comparable typescript, even if the language is an esoteric one.

reply
I think, at least for the next few years, certain preferences and consensuses were accidentally embedded in the models to your benefit.

They love htmx! Claude will independently suggest using it instead of more general js frameworks for smaller projects. A gpt model told me, and I wrote this down because it was striking, "htmx won the argument it was making."

It's the same thing with rust. I'm an ocaml expert and ocaml genuinely fits a lot of the problems I work with better regardless of that. But because of when the models were trained and what they were trained on, a certain sort of alt-consensus opinion is frozen into them, and it believes rust is a better choice for nearly everything!

I think you're good for the next few years at least. It's an open question what happens after that dead internet theory recursive loop of llms trained on llm output etc so who knows you might be good forever.

reply
I agree with this and I'd also say - I've been vibe coding in OCaml since before the training data was good.

All the stuff I lost in training data I gained back in having great compiler feedback.

I don't think agents are nearly as restricted by language or training data as we think.

reply
We will see. Changing things around a bit (especially flipping attribute inheritance to explicit by default) may confuse a lot of models. Oh well, it's the right thing ¯\_(ツ)_/¯

Thank you for your kind words!

reply
Please don’t misunderstand my comment, I wasn't trying to diminish the brilliant work you’ve done on HTMX, which I’ve personally benefited from. I could have probably worded it better than I did. I'm also not saying you _did_ misunderstand it, only asking that you please don't. I was just sharing an observation that I realize is not everyone’s experience. I’m still a fan + supporter, even though I now reach for JS more often because the pain of writing it has largely disappeared. I’m still not a fan of it by any means, but LLMs have been a major mitigator. I'm always happy to see the HTMX updates when they come out.
reply
I've yet to see anyone try to finetune one of these qwen models on a specific framework, but if you guys care, qwen3.5-35B-A3B is rather fast and reliable for a lot of what I'd call "copy/paste" task and might be worth while to see if a fine tune could excel at HTMX universe tasks.
reply
The main issue HTMX address is reducing complexity and LLMs doesn't solve it.

I'd expect it to be the other way around: LLMs will increase HTMX(and similar solutions) adoption because alongside of being excellent at writing HTMX there are also excellent writing web components.

React, vue and similar still have their use case, but htmx + web components can drive you really far.

reply
Out of curiosity, are you defaulting to vanilla js in your agentic dev stack? Or do you have the llm use a framework like react?
reply
I've only tried vanilla JS so far
reply
> now that LLMs can generate JavaScript for us.

You mean generate unmaintainable JavaScript for us.

reply
Not my experience. I have large production apps that I'm able to maintain just fine with thousands of lines of JS.
reply
Depends how you set it up. Like any other project I guess. Funny enough, if you are able to produce maintainable code with an llm you could aswell lead a team of humans. LLMs shift your focus on project management and architectural choices.

I let the llm write components which are independent to each other. This works great and keeps everything clean. The times that llm would only generate unmaintainable code are long gone with OPUS, Fable and sol 5.6

reply
Does HTMX not have some performance gain over JS frameworks? (Never used it before)
reply
The last time I made a website about a year ago, Gemini used HTMX. It was actually my first experience with HTMX, so in a way, LLMs led to me adopting it. :D
reply
It's hard to answer because I don't personally use HTMX as a way to avoid Javascript. HTMX is a Javascript library. And I don't know if I even find using HTMX easier/harder than writing JS, because they are fundamentally different approaches to building apps. It really just depends on what I'm trying to do.

One is a programming language used for writing client side code, and the other is a minimal library that makes server sent documents more ergonomic. Yes, it's a JS library with a few nice conveniences, but the main draw of HTMX encourages a completely different app architecture than what the average dev would arrive at with plain JS.

They're just two different things to me, and so it seems irrelevant if LLMs can help you write one faster. If you're only using HTMX to avoid JS, I don't see how LLMs discourage you from doing that. Wouldn't it be better to vibecode something you have an easier time reading than vibecode a language you don't even understand enough to use? What are you going to do if it blows up?

reply
I mean, htmx and JS glue logic is truly the differentiator now because LLM's do it so well. It's absolutely the way to go.
reply
the browser is and always will be built for dealing with SSR HTML
reply
All apps I build are server-side rendered. I'm not sure how your comment changes the the question I'm asking.
reply
apologies, i thought you were saying you were switching to SPAs because LLMs understand it better. I see some version of that comment nearly daily now. Carry on!
reply
Ah no worries. No SPAs for me, SSR all day.
reply
IMO current browsers are more like an operating system designed for progressive loading of apps.

That doesn't mean do dumb / complicated / bloated stuff for no reason. If the best thing for your users is static html, use that.

reply
That's like rejecting video games because the CRT was built for displaying live TV streams sent over the public airwaves.
reply
Oof bold claim
reply
how so? that's what they do - incomparably faster than dealing with JS
reply