Hacker News new | ask | show | jobs
by jiggawatts 824 days ago
Define "need".

I've been consulting for a large org where someone decided that every web app needs to use a consistent pattern, and they mandated Angular. This could have been React, Vue, whatever, the point is that they picked a client-side JavaScript framework for all of their web apps.

Turns out that they weren't actually making web "apps". They were making web sites with mostly read-only content and a handful of web forms.

Traditional server-side templating, like Razor pages, is a well-established method for handling this. Something like HTMX adds the tiny bit of client-side interactivity that is actually required. Nothing else is needed.

The article talks about about reducing code size to 2/3rds and you just handwave that away!?

That's the exact same thing I've been telling my customer! They're literally bloating out their codebase three times over (3x!) by using JavaScript client-side rendering instead of plain, ordinary, boring, and simple server-side rendering like they should have.

For every single thing that they do, they need a C# bit of code and a TypeScript bit of code, and a whole API thing to wire the two up. They are forced to use distributed monitoring spread across the browser (untrusted!) and the server! Deployments have to factor in client-side cache expiry! And on, and on, and on.

I did a demo for them recently where I rewrote several thousand lines of code with 50. Not fifty thousand. Fifty.

"Thousands of lines? This is fine" -- says the developer on the hourly contractor rate.