The AI cost of JavaScript frameworks

72 points by luu 4 hours ago on hackernews | 34 comments

BatchJob | 2 hours ago

Unfortunately the author is not only correct about front end development vibes, but due to this state of affairs, I ceased to recognize browser based UIs as being software development at all. Too much browser tech is broken to call it software. As for agents, good for them!

tancop | 2 hours ago

Astro comes out on top with the best time, #2 lowest spend and zero client side JS. I know what I'm using for my next project.

vermilingua | 2 hours ago

Can confirm Astro is very very pleasant to use, and the escape hatches for when you do need something a bit more heavy hitting feel very well designed.

truetraveller | an hour ago

next project? pun of the year?

skrebbel | an hour ago

It scores well here because Astro is for “content-driven websites” and that’s what the benchmark app was. I’d be curious how different the results would be if the app was highly interactive, with nontrivial realtime/async stuff going on etc.

usernametaken29 | 2 hours ago

Angular sucks, I always knew it, and now we have some data that it’s broken even for agents. I’m not surprised
> The Pokémon app is small and doesn’t represent a large, complex real-world application.

If you aim to make small apps that don’t represent complex real-world applications you should not use Angular.

But blanket statements like yours are what I hate the most in software industry.

alex_suzuki | 14 minutes ago

When I was running a small dev agency with a sprinkling of web projects, Angular was useful because it every project looked more or less the same. The rigidity (and verbosity) it imposed was an advantage in this setting, as it helped with the cognitive load when switching between projects. Apart from that, I wasn’t a fan either.

Aozora7 | 11 minutes ago

I suspect that results would be different if the app was a bunch of boring forms with complex validation rules, which is often encountered in jobslop.

Not necessarily that Angular would win that, but I imagine that it would at least significantly shuffle the order.

drnick1 | 2 hours ago

Just use plain HTML for God's sake. HN demonstrates very well that you can do plenty without some Javascript monstrosity. At the very least, make your your websites degrades gracefully when JS is turned off.

r_lee | an hour ago

"do plenty" or just use React for everything and have a single thing where you don't need to worry about the limitations or having to remake the same stuff the framework provides?

and what % of users have JS turned off? 0.00001%?

bazoom42 | an hour ago

HN uses JavaScript though, not just plain HTML.

stephbook | an hour ago

And it certainly doesn't do "plenty."
This benchmark is too simplified to be meaningful. The choice of a framework is rarely based on speed alone, it factors in other elements like the user's domain knowledge, long term maintainability and the framework's track record itself w.r.t security and development of features.

In this regard alone, it will make a lot of sense to spend extra $2 and 2 mins to trade off for a long-term maintainable codebase and code you can reason about than just something made quickly just to get it deployed fast.

In my personal use case, that would be Svelte 5 for me and I'm sure it will be something else for everyone.

iammrpayments | an hour ago

Interesting, I’m just sad svelte didnt behave better because of the LLM reading migration guide on every answer

genshii | an hour ago

Glad to see Astro doing well here. It's by far my favorite way to build sites of all kinds, both content rich MPAs, and react heavy web apps.

electroplankton | an hour ago

where is jquery? :(

SwellJoe | an hour ago

On 64% of websites.

shermantanktop | 28 minutes ago

Shhh we don’t talk about it

chvid | an hour ago

It is fairly obvious that it is all going to be some kind of React/JSX with tailwind.

etatester | 26 minutes ago

It's definitely all tail wind

mmusc | an hour ago

Java script frameworks are just extra boiler plate that isn't needed in the age of ai-coding.

Server side page generation with a sprinkle of js will give you the same results with GBS less of packages and comple time

andai | an hour ago

I'm reading that agents can now mash up video games that were written in assembly. At that point I have to wonder if the abstractions are adding anything.

Of course, there is the question of "the human can still understand what is going on", but it's not clear the new frameworks are optimizing for that...

The vanilla advantage is also there in a pure client-side pwa. Arguably it’s even bigger, because the bundle size ends up way smaller and the agent needs to hold less in context.

Plus all the other vanilla advantages: fewer dependencies, lower maintenance, less retraining, etc…

jawngee | an hour ago

Nice to see Nuxt holding its own. Astro or Nuxt are my gotos for client work and personal projects.

andai | an hour ago

Interesting article. Kind of seems like you'd want a more complex task, there's not much differentiation here.

iperov | an hour ago

> in the agentic era, when developers are no longer typing code by hand

I hope I'll be the last person on Earth writing code by hand.

ArcHound | 49 minutes ago

Neocities ride hard on the old-internet hand-crafted HTML aesthetic. Maybe we could start a similar club?

Culonavirus | 15 minutes ago

Plenty of people will be coding by hand for years to come. They just wont be employed for doing so.
I mean it just seems like even in the agentic era, you should know when to use the right tool for the right job. The site shown seems perfect for htmx style websites, so idk why you would use an SPA. Still very cool experiment, appreciate the data and human writing!

shermantanktop | 29 minutes ago

This is buried at the end.

> My goal here is not to write the end-all-be-all benchmark for “I’m a vibe-coder, which framework should I choose?” The point of this post is to demonstrate that it’s possible in the era of AI coding to still make decisions based on evidence rather than vibes.

But it’s obvious that the article will be understood as a useful benchmark, so author probably should have addressed that point earlier and more thoroughly.

Taking the authors pov for a moment, they just showed you how to put all your criticisms to work in making a newer better benchmark :)

sachahjkl | 27 minutes ago

htmx for the win, as always

unsloppable | 23 minutes ago

HTMX is interesting.

I have most of my apps in it without much trouble.

One of my recent ones had a very complicated form and state management.

AI really struggled with HTMX in that use case.

Like the form might work but the page would take 30s to load. Or some state would randomly drop or a toggle wouldn't work after changing a dependency.

If I rewrote that in react it would have one shot it without a doubt. Some things are just better models for different problems.

For the record I eventually got enough tests in place to keep the agent honest and the HTMX version is now a lot faster anything I could have got out of react but yeah, it was an adventure.

samayashar | 19 minutes ago

Solid work, but it would be really cool if we can also test Pokemon motions and how the game responds in real-time. Is an agent able to think about reactions, directional movements and attack patterns of each Pokemon is where the real intelligence test lies.

Traditional languages may have their limitations, but [C++, Rust, JavaScript, TypeScript etc] can still do pretty well.