Full-Stack Web Development with Vue.js and Node

(singke) #1
Introducing Vuex Chapter 8

SPA versus MPA


SPA and MPA serve different purposes. You may want to use one over the other,
depending on your needs. Before you start your application, ensure that you are clear about


the kind of application that you want to build.


Pros of using MPAs


MPAs are the best approach if you want to make your application SEO friendly. Google can
crawl different pages of your application by searching the keywords that you assign on


each page, which is not possible in an SPA since it has only a single page.


Cons of using MPAs


There are a few cons of using MPAs:


The development work for an MPA is much greater than for an SPA because the
frontend and backend are tightly coupled.
MPAs have tightly coupled frontend and backend, which makes it harder to
separate the work between frontend and backend developers.

Pros of using SPAs


SPAs provides a lot of benefits:


Reduced server response time: SPAs fetch all the data needed on the first load of
the website. With such an application, the server does not need to reload the
resources on the website. If new data needs to be fetched, it only fetches the
updated piece of information from the server, unlike multi-page apps, decreasing
the server response time significantly.
Better user interaction: The decrease in server response time ultimately
improves the user experience. With every interaction, the user gets a more
quickly rendered page, which means happy customers.
Flexibility to change the UI: SPAs do not have a coupled frontend and backend.
This means that we can change the frontend and completely rewrite it without
having to worry about breaking anything on the server side.
Free download pdf