Full-Stack Web Development with Vue.js and Node

(singke) #1
Introducing Vuex Chapter 8

Traditional multi-web page application


In traditional multi web page application, when we build a web application and open a
website by navigating to the browser, it requests the web server to fetch that page and serve


it to the browser. When we click on a button on the same website, it again requests the web
server to fetch another page and again serve it. This process happens for every single


interaction we do on the website. So, basically, the website gets reloaded on every single


interaction, which consumes a lot of time.


The following is a sample diagram that explains how a multi-page application works:


When a request is sent from the browser, the request is sent to the server. The server then


returns the HTML content and serves a whole new whole page.


Multi Page Applications (MPA) can provide several benefits as well. It's not a matter of
whether to choose MPA or a Single Page Application (SPA), but it all depends on the


content of your application. If your application contains a lot of user interaction, you
should go for an SPA; however, if the only purpose of your application is to serve the users


with the content, you can go with an MPA. We will explore more about SPAs and MPAs


later in this chapter.

Free download pdf