These things are true if you build a SPA wrong. Believe it or not there are lots of ways to build server side rendered pages wrong too.
There are a lot of standard practices like… using a router to load the content of your SPA according to the url.
What I’m saying is, there’s no right way to build a thing that is inherently wrong.
Remember when websites had a built-in loading indicator, and you didn’t have to implement it yourself via JavaScript?
I remember when the web didn’t have JavaScript.
Honestly, though it was much worse back then. I prefer the variety and features of modern browsing over (mostly) plain text.
What I wish we could do away with on the web is videos. Let’s go back to just images and text, thanks. Animations are fine though 👍
What I wish we could do away with on the web is videos. Let’s go back to just images and text
Seconded. I really enjoyed pre-video Internet.
I third that. Videos are so incredible inaccessible. Want an easy-to-follow tutorial or heck a searchable document? nah mate video is all you get, and ads with it!
I was kindof chief architect for a project where I worked. I decided on (and got my team on board with the idea of) making it an SPA. Open-in-new-tab worked perfectly.
(One really nice thing about it was that we just made the backend a RESTful API that would be usable by both the JS front-end and any automated processes that needed to communicate with it. We developed a two-pronged permissions system that supported human-using-browser-logs-in-on-login-page-and-gets-cookie-with-session-id authentication and shared-secret-hashing-strategy authentication. We had role-based permissions on all the endpoints. And most of the API endpoints were used by both the JS front-end and other clients. Pretty nice.)
I quit that job and went somewhere else. And then 5 years later I reapplied and came back to basically the exact same position in charge of the same application. And when I came back, open-in-new-tab was broken. A couple of years later, it’s not fixed yet, but Imma start pushing harder for getting it fixed.
You think your 13 megabyte parallax-ative home page
Is parallax still a thing? I feel like ginormous hero images are more popular atm.
motherfuckingwebsite is pretty old at this point. I remember seeing it on Reddit like 10 years ago. Parallax was all the rage back then, when we called “hero” images “jumbotrons” (because Bootstrap called it that, I think?)
As an elder developer… yea, we could use react to render complex web pages that erode expected functionality.
Or, like, I’m happy to just go back to server-side rendering… it’s surprisingly cheap to build and dead fucking simple.
Elder developer here too, correctly making my SPAs has made my work significantly more efficient and maintainable now that my back end is basically a rest api and my front end requires very little network interaction after the initial load, which has been made pretty minimal.
I too have been doing this for years and I whole hearty agree with this comment.
For large complex sites, I ain’t never going back.
Actually even for simple sites I’m not sure I’ll go back.
I’ve seen front ends that build queries that are blindly executed by the backend - I’ve seen GraphQL that allows the client to read arbitrary users’ passwords from the database - I’ve seen attack ships on fire off the shoulder of ori- whoops, wrong memory.
Anyways, you can create vulnerabilities anywhere using anything - imo more server side logic might mean more vulnerabilities on the server but it means less vulnerabilities overall.
Elder developer too, you can easily render react server side and statically. Once you remove state, react simply becomes pure functions that output jsx nodes, it’s also dead fucking simple, but gives the the possibility to add hydration and state later if you need it.
I prefer just writing my html, js, css, as is, and then transpiling to pack it down, treeshake, hash, cache bust, CSP, etc etc.
The amount if headache, overhead, inversion of control, mess, and bloat involved in frameworks tends to make me spend way too much time on writing boilerplate.
template
and slot
exist now, and modern js can do most of the shit fancy libs used to.
There’s very little need for frameworks unless you meed a SUPER dynamic website that has tonnes of mutability.
The amount if times i see people load in like 3 frameworks and 10mb of bullshit and ten js files to make a fucking static form that doesn’t even do anything fancy is insane.
Just fucking write the like… 8 lines of normal code to populate the form, wtf? Why are we using routers at all, HTTP already exists and does that, why did we re-invent http?
Front-end devs need to spend less time installing npm packages to try and magically solve their issues and just learn how to actually write code, SMH.