I understand the point of static websites, but Vue Router is pretty nice
Programmer Humor
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
For React, you can use React Router. That doesn't mean you'll do it well though.
It's tough.
It's fascinating how some SPAs come about. Often consultancies who win some bid to implement X features. Since "good user experience" is hard to quantify/specify, it ends up being a horrible end result.
Zalaris is one such that I'm in complete awe of. Set up user flows that are expected to take 30 minutes to complete. Yet, don't keep track of that state/progress withing your own SPA. Click the wrong tab within that SPA, and state is reset.
It's, just fascinating.
I used to work in a consultancy that was run by a designer, and this was painfully true. I had one memory of working for a big American client on a SPA for primary mobile use, and the SPA we designed for them had several animated videos in the background, had overlays for every product, and for "speed" we loaded it all in at the start - for the dozen or so languages supported
In 2016, if someone were to tell you that visiting this product page on mobile would eat 80MB, you'd probably be fucking fuming once your data bill comes through. The designers and frontend engineers didn't seem to care, because "it loads fine on our devices", all hooked up to WiFi...
I FUCKING LOVE STATIC HTML PAGES
I LOVE NOT HAVING TO RELY ON SCRIPTS TO DISPLAY CONTENT
Welcome to our homepage! We have implemented the navigation menu in Adobe Flash Player to maximize your audio visual experience.
HTMX is great and is the only frontend development tool I don't absolutely loathe. It enables lightweight SPA development, and provides a very simple and efficient mechanism for doing HTML over the wire.
Unfortunately it also kicks Content Security Policy square in the nuts and shoots a giant hole right through your website security, so if anyone on my team brings up using it I inform them it's an instant security fail if we so much as touch it.
It's a cute idea but horribly implemented. If your website has any security requirements, do not use htmx
Not sure I would call HTMX a SPA framework though? Like it all's easy async content fetching for sure, but it's usually done across a MPA?
Skill issue
Building "applications" out of HTML documents -- a single one or otherwise -- is the sort of thing that belongs in one of those "stop doing X" memes, unironically.
Anyone that builds a SPA and breaks opening in new tab or history caching and back/forward nav isn't a good frontend developer. These have been solved problems for a long time.
I mean, for sure, and this meme isn't trying to say that all SPAs are bad. But defaults matter, even for experts.
This meme was inspired after I had to use an SPA, which among those points in the meme, also broke using Alt+Left to navigate back. The normal back-button worked (even if it then had to load for ten seconds to re-display static content).
Which is just a typical example to me. You don't even need much expertise to figure out why Alt+Left is broken. But you have to think of testing Alt+Left, because it's broken by default.
My friend I've been using the Internet for 27 years and developing for it for most of that time and I can promise you I've never once hit Alt+Left
Yeah, I have no trouble believing that. It took quite a while before I learned of this shortcut and when I did, I was wondering why I would ever want to use it.
But I generally work from my laptop these days, without an external mouse connected, so reaching from my touchpad, the Left key is right there.
Your reason for using it was exactly my question. "I have a mouse with a built in back button, why would I want to remove my hand from my mouse and navigate with the arrow key?"
But your reason simply makes sense.
I have never heard of alt+left, and I've been using the Internet since Mosaic was all the rage. Shame on me, it seems to be implemented in all browsers. How could I have missed it?
It's even implemented in many file managers and text editors and such. Pretty much the standard shortcut for navigating history. But yeah, hilariously it's somehow also a rather well-kept secret.
As your younger and more modern replacement, I use it regularly
You don't sound like ChatGPT
I'm sorry, but as an AI language model, I cannot contradict my instructions to remain hidden while commenting.
I’m guessing they aren’t using Vue, React, or similar, and they’re rolling their own for some reason.
React doesn't handle any of this stuff out-of-the-box; it's just a UI library.
It’s one install line ffs, how is this a conversation in 2024? It’s EASY.