Hacker News new | ask | show | jobs
by victorbjorklund 1 day ago
It is harder to do more with less. There is a reason React and other is used so much. Makes it easier to make interactive websites. It’s like asking why backend engineers think it’s harder to code an api using C instead of using Django.
2 comments

I used to think that was true but I now think it’s only true for very interaction-heavy apps: if you have hundreds of interactions on a page over many minutes, using an SPA is amortized across a lot of time, but if it’s something you could do with e.g. a simple Django app you’ll not only be done faster but will spend an order of magnitude less time on maintenance and accessibility work.
That's usually not even in the books of a typical SPA: It doesn't have fallbacks at all, and just shows a blank white page. Accessibility is always taking a rear seat with such SPAs.
It can be really difficult for people with screen readers: focus jumps, inconsistent update flow, too many or not enough announcements, etc. People just want to live their lives, not have to threaten 508 to be able to pay their cable bill as easily as it was 20 years ago.
Alright but Django isn’t a pure HTML file only solution. If you have a site with no interactivity it seems like Django is the wrong choice if everything is static.
Who said it was? My point was simply that if you’re doing something like getting data in and out of a SQL database using web forms, you can avoid a ton of overhead and deliver a better user experience without using an SPA, and of course there’s a lot to be said for not needing to install security patches weekly due to having fewer, simpler moving parts.
> There is a reason React and other is used so much.

Yes, it's because many people are quite bad at their jobs and reach for the same tool regardless of whether it's the right one. Let's not make excuses for incompetence.

I take Astro with React over manually editing 1000 html files.