8 ms·
This is something that I see espoused by "web traditionalists" for lack of a better term. Sure, there are a lot of web developers who are not optimising for per
by chrysoprace 7y ago
This is something that I see espoused by "web traditionalists" for lack of a better term. Sure, there are a lot of web developers who are not optimising for performance but I think the difference is that it has simply shifted to the frontend where it's more noticeable.
The kinds of people who care about performance in the backend are exactly like the kinds of people who care about performance in the frontend. There's a variety of techniques that make sense in both areas to create a snappy, seamless experience. You need experienced engineers to create performance no matter what your domain is.
We've gone down the route of creating SPAs to largely replace experiences that would require desktop applications (it was only 5 years ago that I had to download an executable to do my tax return, now I do it with an SPA). Rather than create an SPA for a blog or a simple marketing site, we've largely replaced traditional "heavy"[0] infrastructure (PHP, Apache, MySQL just to display static content) with static JavaScript-generated sites. Many of these can simply be hosted on a CDN because they have no database and often no need for complex routing.
Pretending that SPAs were part of some dark ages is just silly. Horses for courses. If your application requires what I've dubbed "heavy" architecture (above) then by all means! Such infrastructure allows a high traffic service to be highly available, but is not required to serve a single .html file.
[0] When I say "heavy" I'm mainly talking about the attack surface and maintenance required. WordPress is great for serving a blog but has been the target of many hackers due to the amount of security vulnerabilities it has had over time.
- torgoguys 7y agoSPAs being the darks ages is over-the-top, but being an SPA when other web architectures could better serve the user is a dark pattern. That tax app doesn't need to be an SPA. JavaScript powered interactions make the experience nicer for the user, but that doesn't mean it needs or is improved by being a single page.
- muglug 7y agoI think an SPA can be much more user-friendly than a traditional series of server-rendered pages. Email is a great example of this - GMail, at launch, had much better UX than existing server-rendered applications like Hotmail. You can find bad UX everywhere - in SPAs and server-rendered interfaces alike - but there’s nothing implicit to SPAs that reduces usability.
- julianlam 7y agoI feel like Gmail has lost that edge. Email being a text medium should be fast, but Gmail using up many hundreds of megabytes of RAM and taking many seconds to load really feels like they've lost sight of what reading an email is about.
- wyqydsyq 7y agoI too despise the "kitchen sink" approach seen in Gmail's UI where they are trying to cram every unwanted and unnecessary feature into your view and RAM at once. If you used "Inbox for Gmail" before Google abandoned it and miss the much cleaner and focused UI, this Chrome extension upgrades Gmail to have the same styles: https://chrome.google.com/webstore/detail/simplify-gmail/pbmlfaiicoikhdbjagjbglnbfcbcojpj/ https://chrome.google.com/webstore/detail/simplify-gmail/pbm...
- boomlinde 7y agoGmail wasn't a single page at launch, so its UX advantage had nothing to do with that.
- acephal 7y agoWasn't long-polling the killer feature?
- chrysoprace 7y agoNo, it doesn't need to be, but it is nicer. There's quite a lot of complexities to my country's tax law (as with any country's tax law, really) and it's heavily simplified by giving you highly dynamic choices. Trying to use my country's immigration site, which has some JavaScript sprinkled on but is largely static, is a largely inferior experience.
- ShinTakuya 7y agoThere's no reason you can't query a backend for the complexities and present those dynamically to the user. For instance, quite often an SPA might ping the backend for a list of states or provinces once you've selected a country.
- chrysoprace 7y agoSure. It's up to the engineer implementing said app to determine the best fit for the project. At the end of the day, you have to choose what's right for your users; whether that's a seamless experience with no full page reloads, or the occasional full page reload.
- ng12 7y ago"Single page" isn't the why it's the how. It enables you to take a JavaScript-first approach which in turn makes building complicated applications easier.
- henrikschroder 7y ago> It enables you to take a JavaScript-first approach Uh-huh... > which in turn makes building complicated applications easier. What? This is vacuous market-speak.
- ng12 7y agoI mean... not really. I wouldn't invest in building client-side applications unless they bought me something. My customers don't really care, the majority don't even know what an SPA is. They do care that our application is faster and has more features than our competitors.
- wyqydsyq 7y agoTo word it more technically, building an SPA allows you to build applications as declarative composable functions which are deterministic, as opposed to the spaghetti code commonly seen in the days of jQuery and PHP which is harder to read, reason about, debug and maintain due to their imperative and nondeterministic nature.
- henrikschroder 7y agoI literally can't tell if your comment is satire or not. I hope it is. I fear it isn't.
- wyqydsyq 7y agoIt isn't. I elaborated a bit in my later comment: https://news.ycombinator.com/item?id=22523344 https://news.ycombinator.com/item?id=22523344
- rovr138 7y ago
- wyqydsyq 7y agoIf it's a web-based user interface as this tax app sounds to be, it is arguably improved purely by being an SPA. Requiring full page reloads just to submit or change some tiny bit of data in a page is objectively bad UX.
- julianlam 7y agoBesides doing my taxes on paper, I can't think of anything more tedious than filling out tax forms via a vanilla HTML form. At least my SPA tax software makes the form filling a little more exciting, and doesn't s#!t the bed when I hit enter by accident
- non-entity 7y agoPersonally I wish more forms did have enter bound to submittal
- colecut 7y agoSimple form validation would prevent that, not exactly SPA worthy.
- tonyedgecombe 7y agoMostly I want my forms to be reliable, that doesn't seem to be the case for many SPA's. Getting a blank page is a very common experience and much worse than a barely discernible delay submitting a form.
- zelphirkalt 7y agoA problem is, that I need to fiddle around with JS blocking, even on official websites from city, state or gov, because they hired inresponsible web devs or made inresponsible decisions to let Google and others track me on their website. So initially they will be blocked. As far as "experts" for SPA are concerned, they often do not even include a noscript tag, which means I see a white page. Now it cannot become less user friendly than that. I've yet to see a SPA, which offers a working alternative via noscript tag, when I blocked all their tracking. The thing is that SPA all too often serves as a way to force tracking onto the unsuspecting user. "You need to allow our JS! Your browser is outdated! Use Chrome!" and the unsophisticated person will think: "Oh well, lets just whitelist this page dammit!"
- colecut 7y agoWhat in JavaScript are you using to take the place of a server side database? Your comment seems to imply that the only options are SPA or WordPress.. If you are building something that would normally need to be a desktop app, sure, an SPA might be a good idea. But this is still rarely the case, most web pages are just are just presenting data, and in those cases, the less JavaScript the better.
- chrysoprace 7y agoI'm not. If your application needs a database, then it needs a backend. An SPA isn't inherently a "backendless" application.
- codebolt 7y agoA better question to me is, what does WordPress offer that a static site generator like Jekyll can't?
- Mandatum 7y agoA management system my photographer friend can use without learning what "CLI" or "GitHub" are. They just login and make changes.
- htgb 7y agoThere's https://www.netlifycms.org/ https://www.netlifycms.org/ if you want a static site generator with a CMS, FYI.
- hanniabu 7y agoAre you aware of any open source applications as a CMC for static generators like Jekyll? Would be very convenient to have one with a a simple github login/auth settings page and then add/edit page/post options and the ability to select or upload a theme would be great.
- 7y ago
- nn3 7y ago>You need experienced engineers to create performance no >matter what your domain is. Actually the funny thing with HTML is that the simplest things are fast. If you just write a old school HTML web page without a bazillion frame works and not going too heavy on graphics things are usually fast. And doing that is literally so much simpler and easier than learning all the super complicated frameworks of the day. So it's a progression from initially fast for simple, to slower and slower as people learn the complicated (and slow) frameworks, and then eventually maybe fast again if you have an expert who can make all this mess fast again. Most people never reach that expert stage of course, but sadly still leave the "easy and fast" stage.
- cj 7y agoThis perspective is reasonable, until you start applying it to highly interactive / dynamic GUIs. Real-time chat is the most obvious case where the html purist won’t offer an acceptable experience. Another example: any page that displays a row/table of data that the user wants to sort (frontend libraries make sorting instantaneous, compared to full page refreshes with html-only). There are lots of people using complicated frontend frameworks in cases where pure html from the server would obviously be better. But it’s difficult to argue all libraries are bad and slow for every application.
- brightball 7y agoTable sorting in the front end only works if all of the data exists in the front end though.
- yurishimo 7y agoYeah if you actually want to sort datasets of any meaningful size, you’ll be making requests to return database results anyway since a database is going to be infinitely faster and more comprehensive than any client side solution.
- 6510 7y ago> Real-time chat is the most obvious case where the html purist won’t offer an acceptable experience. ??? <pre>If you have any questions: Phone: <b>0123456789</b> <a href="tel:+18123456789">[call me]</a> whatsapp: <b>0123456789</b> <a href="https://wa.me/0123456789?text=I'm%20interested">[message me]</a> facebook: <b>html.purist</b> <a href="https://www.facebook.com/messages/t/html.purist/">[message me]</a> </pre> https://jsfiddle.net/r3u5yvk8/ https://jsfiddle.net/r3u5yvk8/ I'm now on their contact list.