Live data from Hacker News

The Disadvantages of Single Page Applications (2014)

adamsilver.io

41–50 of 105 posts

Re: The Disadvantages of Single Page Applications (2014)

#41

As with everything, if you're going to do SPA, you should do it well. So far, one of the best SPA website I've seen is https://gocardless.com (disclaimer: I work there). Once loaded it's probably one of the fastest website I've browsed, and it doesn't have any of the drawbacks you mentioned: navigating to a new page is quick: ✓ navigating back is quick: ✓ remembering scroll position: ✓ cancelling navigation: ✗ but we…

More details about SEO would be helpful, considering that's probably the MOST important aspect of going all SPA or not. Are you doing some escape fragment/headless browser for googlebots?

It's pre-rendered on the server with React:

  
http://facebook.github.io/react/docs/top-level-api.html#reac...

Re: The Disadvantages of Single Page Applications (2014)

#43
Senna.js is a blazing-fast single page application engine that provides several low-level APIs that allows you to build modern web-based applications with only ~8KB of JavaScript without any dependency. http://sennajs.com/

Most of the issues reported by this article are not a problem with it thanks to its approach.

Disclaimer: I have contributed to the project.

Re: The Disadvantages of Single Page Applications (2014)

#44
post #24

As with everything, if you're going to do SPA, you should do it well. So far, one of the best SPA website I've seen is https://gocardless.com (disclaimer: I work there). Once loaded it's probably one of the fastest website I've browsed, and it doesn't have any of the drawbacks you mentioned: navigating to a new page is quick: ✓ navigating back is quick: ✓ remembering scroll position: ✓ cancelling navigation: ✗ but we…

Except, I think this is actually somewhat an example of what the author is saying, because when I click around links: * Support * Guides * Login * Blog are all outside the SPA, and some appear to be MPA apps. And perhaps once I logged in that would be its own new app as well? So in that sense, your website in not an SPA, you have an app for getting new signups which is an SPA, and then you have a bunch of other SPA o…

You are right, we have multiple applications, it makes it way easier to maintain them. It would be a nightmare if everything (splash pages, dashboard, blog and any other app you can have) was bundled into a single application, be it SPA or MPA.

Agree, it's all about the user's experience for us, we use whatever tool we feel enable us to build the best UX (without breaking the web).

Re: The Disadvantages of Single Page Applications (2014)

#45

Earlier quoted context omitted.

Cool site, I just checked out on Android phone, works (as in fits on screen) in landscape mode; otherwise not. As far as SPAs go the initial page load is relatively fast. Mobile aside, what is really gained in the SPA approach here when you have what is essentially a brochure site? That is, there isn't a lot of content, and it's all static AFAICT, so why not just send the minimal amount of html over the wire and be d…

I don't suspect he was referring to the gocardless product site, but instead the actual dashboard product. https://gocardless.com/pro/#features https://gocardless.com/features/#dashboard

I was actually referring to the product site itself.

But you're right our dashboards are also SPA.

Re: The Disadvantages of Single Page Applications (2014)

#46

As with everything, if you're going to do SPA, you should do it well. So far, one of the best SPA website I've seen is https://gocardless.com (disclaimer: I work there). Once loaded it's probably one of the fastest website I've browsed, and it doesn't have any of the drawbacks you mentioned: navigating to a new page is quick: ✓ navigating back is quick: ✓ remembering scroll position: ✓ cancelling navigation: ✗ but we…

Any idea why on https://gocardless.com/merchants/new , when the Email Address input has focus, Cmd+Left arrow do not navigate to the previous page? Once the input no longer has focus, I'm allowed to use the shortcut again.

No idea why that's the case but I'll mention it to our front-end team

Re: The Disadvantages of Single Page Applications (2014)

#47
post #37

Earlier quoted context omitted.

What would a stop button in Word be like? It really depends on the type of webapp and experience you are trying to create.

Ah, but see, the stop button, back and forward, scrolling down, etc. are how the web worked. And best practice has always been, "don't break the web". Now... people break things. We went from having a consistent UI experience in the browser to everyone just making stuff up. Not good.

I believe that some things shouldn't be SPAs (but, unfortunately are). Some of our clients[1] use SPAs for regular websites (which just makes me eyeroll).

A good example for a SPA would be something like a webmail client, a word processor, or a chat.

A bad example of it would be a blog, or a product website; these are much more suited for MPW

I'm conflicted wheteher these would benefit from a SPA or not: discussion boards, web shops and the like. I can see them benefiting from SPA, but I can also see some disadvantages. I guess they'd be more suited for a "hybrid solution" (MPW with some AJAX and/or WebSockets).

[1]: I work for a hosting company, so our clients are usually web developers (or sometimes they hire web developers).

Re: The Disadvantages of Single Page Applications (2014)

#48

As with everything, if you're going to do SPA, you should do it well. So far, one of the best SPA website I've seen is https://gocardless.com (disclaimer: I work there). Once loaded it's probably one of the fastest website I've browsed, and it doesn't have any of the drawbacks you mentioned: navigating to a new page is quick: ✓ navigating back is quick: ✓ remembering scroll position: ✓ cancelling navigation: ✗ but we…

If you really wanted you could use the HTML5 history API, with a fallback to #hashtags.

Better than falling back to #!hashbang / document fragment navigation - situation allowing - is falling back to a full web page load. (There is even tech allowing for graceful fallback to full form submissions in lieu of AJAX'd form submissions.)

Only ancient browsers fail to support the HTML5 History API. Currently, that is around 10% of the web. Your customers are likely to have a newer browser than IE 9 if they have a budget for technology at all.

http://caniuse.com/#feat=history

★ The problem with embracing the hash for navigation is that you are now committed to running JS on your root FOREVER to detect those URLs - or old bookmarks & links & social media posts will break ★

Re: The Disadvantages of Single Page Applications (2014)

#49
One of my favorite SPAs is Trello. It demonstrates a great use case for a single-page app, a highly-interactive interface based around a single view.

I realize that the "single page" in SPA refers to loading a single HTML page, but I've generally felt like SPAs work best when they're based around a primary view.

Once you start building a SPA that emulates a multi-page website, you're suddenly jumping through hoops that the browser/HTML previously gave you for free (routing, URL history, back button, etc.). If the main thing you'll get in return is faster page transitions, it's probably not worth it.

Re: The Disadvantages of Single Page Applications (2014)

#50

Nearly all of these complaints about SPAs have to do with navigation. It's true, when you make a SPA, you need to factor in routing. That's part of the design decision. When you use a SPA framework like Angular, the typical go to is to use Angular UI Router ( https://github.com/angular-ui/ui-router ) to manage your page and state transitions within those pages. By default, you get back button support, it's highly cus…

does it get forward button support as well, the only SPA I know with reasonable support in both directions is GMAIL and that is recent.

Yes, you get forward button support.
Post reply on HN