concept spa in category angular

appears as: SPAs, n SPA, SPA
Getting MEAN with Mongo, Express, Angular, and Node.js 2ED

This is an excerpt from Manning's book Getting MEAN with Mongo, Express, Angular, and Node.js 2ED.

Figure 2.1 is a great setup, ideal if you have or intend to build an SPA as your user-facing side. Angular is designed with a focus on building SPAs, pulling in data from a REST API as well as pushing it back. MongoDB, Express, and Node.js are also extremely capable when it comes to building an API, using JSON all the way through the stack, including the database itself.

But sometimes, they’re not appropriate. If you want to pack up the surfboards and take your family away for the week, you’re going to struggle with the sports car. As amazing as your car may be, in this case you’re going to want to use something different. It’s the same story with SPAs. Yes, building them in Angular is amazing, but sometimes an SPA isn’t the best solution to your problem. Let’s take a brief look at some things to bear in mind about SPAs when designing a solution and deciding whether a full SPA is right for your project.

SPAs generally offer a fantastic user experience while reducing the load on your servers and therefore also your hosting costs. In sections 2.3.1 and 2.3.2, you’ll look at a good use case for an SPA and a bad one, and you’ll have built a full SPA by the end of this book.

Figure 11.1. This chapter adds an authentication system to the application that touches most parts of the architecture, such as the database, API, and front-end SPA.