by _ea1k · 8y ago · 0 comments
"page reloads vs. single page applications" - I've worked with plenty of "page reloads" frameworks that were at least as complex as their SPA counterparts. I get that you don't like Javascript, but seriously, SPA is proven and popular at this point too.
The author has probably been burned by people who use shiny/new tech just because it's shiny/new. And I guess he thought we needed a manifesto for this situation. But I agree, the "get off my lawn" tone makes it not very effective IMO.
You get a team tell them "let's do this widget" with no detail, no edge case scenario, no perf requirement. So they choose last awesome tech which solution a problem they got last time and will look good on a resume. And only after a month or two of making things do the real hurdle of this tech start appearing. All the things you never see mentioned in those "let's get started" tutorials or shiny-techs online conference.
With some time spent thinking about the problem space and what happen when things go bad your team could have sensed that nothing is all sugar and rainbows. Take micro services: at first it looks elegant. But when you start thinking about how to manage transactions for some actions across multiple services or how to handle some of your server dying then coming back to life you suddenly have the urge to stop and check if you really need this kind of architecture at first.
It starts with a list of things that everybody obviously wants, goes on to give very specific examples with absolutely no backing or evidence, and finishes with some hand-waving "you get the idea".
Also, "nor will we defend our lack of knowledge of their hyped and volatile technologies" really comes off as complacent ignorance.
The best way to try and fight something is to first learn about it. You might even learn that the thing you're fighting has some useful lessons in it.
I don't advocate for pageload-based frame works (asp.net webforms, cf, a bunch of roll your own phps, etc), and I believe a lot of the vendors of them have been kind of moving away from them toward a more bare-metal HTTP approach, but that doesn't mean they don't have a place.
In RAD and click and drag IDEs that large corporations prefer, you can hand a single Junior level developer a requirements document, and expect them to be able to build a back-office type application.
Cookies and injection attacks vs Local storage
Fat server sessions vs fat client sessions
Forms and CSRF vs XHR JSON
Let's not pretend that web tech has somehow been Nirvana at any point in the past.
While I still stumble upon SPA that can't even get navigation right.
But the main reason is still this:
I compared the serverless website (considered a state of the art SPA) with the hackernews website (considered a student level website) on an edge connection in the German country side:
Hacker news:
- first load: 6 seconds
- next loads: 3.5 seconds
Serverless:
- first load: 26 seconds
- next loads: 7.5 seconds
For a webpage displaying static text.
I think a good SPA is a superior experience but a bad SPA is worse than a traditional page load approach.
It takes like 4s for me.
Though I think you're kidding yourself if you think HN is typical.
I can't see any reason why there should be anything but a very small difference on way or the other.
He is handwringing about single-page applications. SPAs have been kicking around for, what, a decade? Let's be real--in this article the single-page application complaint is a proxy for "I don't like JavaScript" and he's entitled to that opinion but it is certainly not "experimental"; JavaScript is not going anywhere, it is well-understood both in browser and on the server, and the libraries and ecosystem are not going anywhere either--if Facebook died tomorrow there would still be React jobs in 2023.
There are parts of current software development that really, really suck. The author does not capture them; this is "new things are scary" complaining and very little more.
Only with big players: facebook, gmail, etc.
Small crew SPA usually suck big time precisely because there is not django/ror/etc equivalent for SPA. So people write it by hand. And they don't all have the talent pool and money the GAFAs have.
(And, speaking personally, my now-standard stack of TypeScript/Express/TypeORM/tsoa provides a level of architectural enforcement I've only really gotten previously on the JVM, but with significantly less mucking around with my runtime.)
NoSQL databases have been around since the 60s [1], and the term was created in 1998. Two decades ago. Is the author of this manifesto saying that they'll only work with tech from the 50s? Or is the 80s good enough? The 90s clearly isn't.
In fact, Ajax has _also_ been around for two decades; 1998 was a big year for the web, apparently. The Outlook Web App (a major milestone in SPAs) was created in 2000, 18 years ago.
This "manifesto" is nothing more than "I choose to bury my head in the sand and use outdated tech and ignore the state of the art!"
I think workplaces really, really should be using newer/"sexier" programming languages and libraries, but not as a blanket approach. People should be allowed to experiment and try new things, especially for projects or parts of projects that are new and exciting. This shouldn't be in lieu of existing and well-known technology.
If they are trying to imply it by giving examples of technologies that are hardly new or experimental, then that's even more cause for being explicit.
Perhaps they could have picked more black-and-white examples like blockchain, so many dead javascript libraries, so many rebuilds of existing technologies. But I happen to agree with their examples largely.
With that said, you have to be smart and know when boring is not enough. 3-tier apps are great until complexity pushes them into gnarly monolithic messes that resist change. And with some sensible UX thinking adopting SPAs can push your user experience forward. NoSQL databases might not be the best choice as your primary datastore but might be a better alternative than materialized views (Graph databases are often utilized by some organizations as part of their secret sauce)
Anybody can code a HN clone. An SPA HN clone that is not a total disgrace though ?
It's certainly popular. I wonder if sites like github would be simpler for users, developers, and devops if they just embraced SPA - judging by your comment, maybe?