Why do you build with SPA?

SPA(Single Page Application) is a hot topic for building a web application. If you were a front end developer, Firebase helps you build applications easily. It’s related to speed and usability, but I want to know why developers like to build an application with SPA. Do you have any ideas?

SPAs are awesome because:

  • They don’t require a full-page reload every time you take an action, like clicking a link or filling out a form.
  • They offload most of the heavy lifting to clients instead of the server, which just makes more sense, cost-wise.
  • People expect SPAs now. They want instantaneous feedback. If the page reloads, if it’s slow because it has to talk to the server. Every. Single. Time. Then it becomes super annoying compared to the other popular apps that are built as SPAs.

That’s just off the top of my head – I’m sure I’m missing other benefits. As for Firebase, we’re using it here for Hacker Noon 2.0, and we love it so far. It has its trade-offs and limitations like any other platform, but ultimately if you don’t want to deal with a lot of backend and devops work, it’s a great option. Just be aware of the costs for large, high-traffic applications, and know you can combine it with a CDN to massively reduce costs. :slight_smile: That said, you don’t have to use Firebase to build a SPA. I’ve built SPAs with Rails and Node.js as well – happy to help if you need a hand there. Feel free to ping me here, or in a DM.


All right, I think it would be very helpful for me and I appreciate it a lot. I absolutely agree with @austin hat SPA is awesome, And just like you said it helps a lot to improve UX. I am sure that in the future we will be able to built more application with SPA.

Next question is which types of applications are suitable for SPA ? I think that high bounce rated website may not be suitable and one of the reasons is that it takes a lot of time when users access. And how about SEO?

Excellent questions! To address your first question, I think most types of apps these days are suitable candidates for a SPA. High bounce rates aren’t such a concern for me, mainly because you don’t truly know how high your bounce rate will be until you build it. That brings me to your last question, about SEO (excellent question, btw). This problem, all of the problems you mentioned, really, can be solved by server-side rendering, or SSR. SSR means you render the initial page server-side, as you’d expect from the name, and use frontend (default) rendering for the subsequent requests. This means you get SEO juice, because the content is available as soon as the page renders (just like a traditional server-heavy app). This also means you get faster initial renders, since the client doesn’t have to ask the server for a ton of data for that initial render. Let me know if you have any more questions! Always happy to help! :grin:

1 Like

Perfect! Thank you so much for your explanation.
I really like this discussion :wink: SSR solves SEO problems, but sometimes it costs much. (I don’t know because I haven’t tried to develop SSR yet ). But it sounds a good opportunity for me to try to build it with SPA. It is really helpful. Thanks again @austin

1 Like

SPA == microservices?

1 Like

SPAs provide a bunch of benefits like seamless and smooth user experience, easy development, simplified debugging and reuse of the same code to built mobile apps. Many apps that you frequently use are single-page apps like Facebook, Twitter, Gmail, Google Docs, etc.

1 Like

Single Page Application.

I agree.

1 Like