Choosing between traditional web apps and single-page apps
So far, we have seen that there are two approaches to building web applications. One approach is the traditional way, where all the application logic is served on the server side. The other one is the modern approach represented by SPAs, where all the user interaction is handled by the browser using a client-side framework that communicates with the web server by consuming a web API. There is also a way to have a hybrid solution by combining the two approaches together in one solution.
The following diagram shows the two approaches. We can see that in the Single Page Application, we have multiple templates that will be rendered in one single page using a client-side framework; also, there is no full-page refresh in this approach. While in the Traditional Web Application, we can see multiple pages that enforce a full refresh of the page when navigating from one page to another: