TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

In Defence of the Single Page Application

128 pointsby djha-skinabout 3 years ago

14 comments

ijidakabout 3 years ago
This is great.<p>Agree. SPAs for everything is ridiculous.<p>My opinion below.<p>1. The web was designed for content. Thus...<p>2. If a site is content focused, no need for a SPA. The web already works for it as is.<p>3. If a web app is a forms based application, still probably no need for a SPA. (The web was designed to support forms almost from the beginning.)<p>4. If a web app has complex user interactions (e.g. drag and drop, etc. Think, word processor, photo editing, etc.) on a &quot;Single Page&quot;. Or jumping between different views of the same data from a single page. Then, logically, that is a real single page application! And a SPA fits the use case.<p>Otherwise, a SPA is too much engineering to solve a trivial software engineering problem.
评论 #31275807 未加载
duxupabout 3 years ago
The SPA meta discussion is so tiring.<p>The bemoaning of them in absolute terms is absurd. The examples of &quot;here is an app with a few lines of javascript so you don&#x27;t need an SPA&quot; &#x2F; &quot;I wrote my blog without using a framework&quot; is even more absurd. And the more complex &quot;just server side render it then&quot; is a hell of &quot;idea guy who doesn&#x27;t have to do the thing&quot; problem.<p>The whole ordeal is now more drama and than worthwhile IMO, and I don&#x27;t think anyone reading this stuff is making these decisions.
评论 #31275889 未加载
评论 #31275993 未加载
评论 #31275839 未加载
评论 #31276910 未加载
rossdavidhabout 3 years ago
If, as I&#x27;m guessing, this is meant ironically, and the spinning wheel and &quot;loading article&quot; is what everyone sees, then I&#x27;m amused. Actually, I guess I find it amusing either way, intentional or not.
评论 #31275529 未加载
评论 #31275830 未加载
namecheapTAabout 3 years ago
I have a feeling this is more to do with developers being lazy than a problem with SPAs.<p>I wrote my own SaaS product a few years ago as a SPA, using php backend and basically jQuery front end. It runs on a namecheap shared hosting server for $5 a month. It loads faster than 95% of the internet because as I was learning from YouTube and stack overflow, my #1 goal was to be fast. So it was.
sysadm1nabout 3 years ago
Done my usual ritual of temporarily enabling JS with uBlock Origin to view the page, and was trolled heavily. Bravo!<p>SPAs have their place. They fail when a webpage that can be done with HTML &amp; CSS alone is &#x27;appified&#x27; and requires JS to view.<p>Many webmasters over-engineer a website with JS bells and whistles, which is terrible for accessibility, often adding fake loading spinners to give the illusion the page is loading new content, when the content is already there.<p>Also you see artificial delays &amp; animations when you scroll, AKA &#x27;scroll spying&#x27; with content jumping onto the screen, because, hey, you can do that, but it doesn&#x27;t mean you should!
评论 #31275780 未加载
xiekombabout 3 years ago
Not long ago coindesk.com updated their website with whatever JS framework and then behave exactly like OP joke. You had to wait nearly 15s with a loader before being able to see the front page. How is it even possible that nobody in the management and dev team realized that this was an absolute failure for a news site ?<p>They reverted back to some more traditional behavior some times after, but common!
vegardlarsenabout 3 years ago
Brilliantly trolled, sir.
scarmigabout 3 years ago
And people say HN can&#x27;t appreciate things for comedic value.<p>The best thing about this is that it&#x27;s entirely statically rendered and works with JS disabled.
skulloneabout 3 years ago
Can I use this space to complain about Confluence? The jarring loading of divs and navbars and content - plaintext content mind you. And we have over 15MB of javascript to display Confluence articles. How did things get so bad? Is it inexperience product owners, product designers? I timed a Confluence load, and it didnt finish grabbing and executing JS for like 17 seconds, which is -insane-
rchaudabout 3 years ago
What&#x27;s an example of a bad SPA that gets people up in arms?<p>There&#x27;s been a lot of ink spilled on the topic, but in my experience, most SPAs I run into (ecommerce stores mostly) are....fine?<p>Sure there&#x27;s a &quot;Loading...&quot; content skeleton animation sometimes as the content populates, but otherwise it&#x27;s perfectly usable by end users.
评论 #31279132 未加载
yakshaving_jgtabout 3 years ago
Wonderful. I love it. Thank you.
jillesvangurpabout 3 years ago
The arguments for and against SPAs feel a bit like ground hog day and a bit beside the point now that we have a third option: native code compiled to wasm that completely bypasses the DOM&#x2F;JS&#x2F;CSS combo in favor of just rendering straight to a canvas or webgl.<p>I care about two things as a user:<p>I want to receive content in a convenient way and I&#x27;d like the web experience to be as good or better than the mobile experience. It seems that very few web developers are capable of doing that. I blame DOM&#x2F;JS&#x2F;CSS for this.<p>I don&#x27;t particularly care about &quot;native&quot; as a user. I do care about non stuttering and smooth animations if they need to be a thing, slick design (I appreciate good design). The competition on mobile is so fierce that a lot of content gets presented using native apps because that seems to be the best way for developers to deliver the best possible experience to users.<p>I don&#x27;t see why a desktop web browser should be any different. Give me the best experience, not some javascript developer&#x27;s watered down version that works around gazillions of limitations imposed by DOM&#x2F;CSS&#x2F;JS. Browsers now have all the means to do other things. If it can run Unreal at 60fps, there&#x27;s really no good reason for that browser to do a worse job than a native IOS&#x2F;Android app.<p>Take Hacker News as an example. A fine example of old school brutalist design and intentionally so even. It works and I understand why this is and even respect that. There are many apps in the appstores for IOS and Android that attempt to deliver a native experience for HN content. Some of these apps you might consider to be superior in how they deliver the content. You get to swipe content, there are slick material design things, etc. Popular with some people. There are good reasons to use native UI frameworks for that.<p>Now here&#x27;s the kicker: there&#x27;s no technical reason for a browser to provide you a worse experience than a natively developed application. Basically with wasm you could do whatever and you can have it 3D accelerated with web GL. Package it up as a SPA and you get to bypass the Apple and Google app store censorship too. Win win, you&#x27;d say. Not a lot of websites seem to be going down that path yet though but it&#x27;s not that hard to pull off. Take Figma for example. Very slick and it&#x27;s mostly C++ rendering to a canvas.<p>There are of course a few reasons to prefer spas or html+css over wasm with some kind of native thing for delivering content: SEO, loading speed, accessibility, etc. But rendering quality, fancy design, or slick features are not among those reasons. That&#x27;s what you sacrifice to get those other things. The web always was a bit of a compromise.<p>There&#x27;s a reason native applications are popular with users and developers. Users like them because they are slick. Developers like them because they know it results in the best experience for the user. So, why is that different on the web? Same content different rules? Aside from the above reasons, there&#x27;s very little reason to hold back on the web. We&#x27;ve all just gotten used to believing that we have to. Challenging beliefs like that once in a while is not a bad thing.
mgdlbpabout 3 years ago
Oh, the disappointment every time this is what went into a web archive!
tofuahdudeabout 3 years ago
Clever but not really appropriate for HN.
评论 #31275620 未加载
评论 #31275695 未加载