Live data from Hacker News

SPAs Were a Mistake

gomakethings.com

211–220 of 637 posts

Re: SPAs Were a Mistake

#211
I've been thinking about this a lot, and the one thing I love about SPAs is that everything the user can do from the front end. They can do from the API. The trend has essentially tricked tons of corporate apps into opening up APIs to their users. My screen scraping skills are starting to get rusty, but it's worth it.

I sometimes daydream about a framework that allows me to build a spa and a server side app at the same time using the same url scheme.

Re: SPAs Were a Mistake

#212
post #178

Earlier quoted context omitted.

The correct answer for this stuff, and it absolutely kills me saying this, is probably something like asp.net web forms.

Asp.net web forms absolutely sucked. They fundamentally misunderstood HTML and how the internet even worked. Modern Razor's pretty good (not Razor Pages, they also suck) which is probably what you mean. But it's not that much different from Rails, Laravel, Django, etc.

Yes I mean the original version of it.

I'd love to watch people attempt to implement some of the stuff I pulled off with that back in the day now. Occasionally, very complex data driven page flows are required and you could nail that entire problem domain trivially with them.

There is a very large and well known company with a front-facing product used by millions of people which took 5 years pissing around with three different front end technologies to reimplement what we did in 3 months with that and it was slower and heavier and basically reimplemented web forms in python in the end.

It broke the the www intentionally because it sucked. And it still does.

Re: SPAs Were a Mistake

#213
post #94

"SPAs were a mistake" Meanwhile essentially every major tech property develops SPAs and users enjoy them far more than traditional hypertext web round-trip-every-change pages

Big tech companies love wasting money and developing a SPA is a good way to do that.

Whether users prefers SPAs or not is debatable. Amazon, Github, and Aliexpress aren't SPAs because poor usability will cause users to move to competitors. If Hacker news turned into a SPA, I guarantee that it would suck big time.

SPA developers seem to be living in a tiny bubble oblivious of simple solutions to simple problems.

Re: SPAs Were a Mistake

#214
My company wouldn't know it.

I'm lead on a large Angular 13 app used by tens of thousands of companies, it works and it's very fast.

I wouldn't call SPAs a mistake. I have 2+ decades in the industry and come from an ASP.Net / MVC background prior to Angular.

Re: SPAs Were a Mistake

#215
post #147
post #130

Earlier quoted context omitted.

> Where in this process did you need to start adding navigation via JS? Did that functionality really require JS, or was it implemented that way just because other parts are JS, and the trend was continued? Could you have used Stimulus controllers to manage functionality on the page itself, but when it came time to navigate to a new page, just done a basic browser redirect? In my specific example, the navigation itse…

> In my specific example, the navigation itself didn't happen through JS, but you need to hook into navigation APIs to handle backing into a partially-filled form after submitting to rebuild the UI to reflect the state before the user hit submit. I'm not sure I understand. The "conventional" solution to this is not to do it -- the reason browsers don't re-fill submitted forms is to prevent duplication. Give users the…

But browsers absolutely do keep the form filled unless your HTML or JS says otherwise. Pressing back after submitting on a vanilla HTML form keeps all values in place. As it should.

Re: SPAs Were a Mistake

#216

Earlier quoted context omitted.

At least since HTML5 and CSS3 and ES6 (so many years already) these technologies are made for SPAs. There aren't many better UI frameworks, and WPF isn't that by a long shot.

ok dont look up how long grid layout has existed in wpf

Who cares? (I know btw I used to be a C# engineer in my previous life - I actually first used WPF when it was still beta)

Here and now, WPF is much worse. Even Microsoft itself now invests into React Native.

Re: SPAs Were a Mistake

#218
post #8

I don't disagree with most points here, but I did chuckle at this one: > YouTube is a great example. Being able to keep a video playing while you explore other videos is fantastic. I hate that (mis)feature. When I click something else, my attention is on the new thing. Having to go find the little still-playing video window to close it is a hassle.

[deleted]

Re: SPAs Were a Mistake

#219
It's posts like these where I can feel the age of HN.

For many developers, especially in startups, SPAs are all they've ever known.

Now, I'm relatively young, but I'm old enough to know monolithic django before moving onto angular then onto react, and it is quite staggering what I'm capable of doing in SPAs as opposed to traditional web pages.

You mentioned Soundcloud and Youtube, but you'd be lying to yourself if you think the list comes even close to even stopping there.

How about fantasy drafts in DraftKings, Sleeper, or FanDuel?

How about chess like chess.com or lichess?

How about collab tools like Trello, Monday, or Asana?

I wouldn't even dream of building these types of applications in a traditional web app

The level of interactivity that is capable within SPAs makes applications like these seamless and snappy, and overall feel-good for the user.

Re: SPAs Were a Mistake

#220
Most of that navigation stuff is long-solved - e.g. Angular's router will do a lot of that.

If you want to do a SPA without a modern library, then yes you will need to reimplement a bunch of stuff. But who would start from scratch? Unless you are doing something incredibly niche or tiny-tiny-tiny, just use Angular or React or whatever and don't worry about the minutiae.

Of course there will now be people screaming at their screen about how this attitude is everything that is wrong with the modern web etc. I am sure they'll get over it one day, or just go use gopher/Gemini if not.

Post reply on HN