DEV Community

gianlucasms
gianlucasms

Posted on

USE MICROFRONT-END FOR SPA OR MPA BECAUSE AND WHY?

Im a beginner and i have a question, to use microfront-end, do you prefer SPA or MPA. Because and why?

Top comments (5)

Collapse
 
theaccordance profile image
Joe Mainwaring

While I don't want to discourage learning, I'm inclined to recommend that you first learn about SPAs and MPAs before you try to wrap your head around micro-frontend architecture. Micro-frontend is an advanced concept and a solution to solve problems at scale. It involves organizing your project and/or infrastructure in a way that horizontally scales.

Having the knowledge around SPAs and MPAs will answer your question when approaching the idea of implementing micro frontends.

Collapse
 
gianlucasms profile image
gianlucasms

Thank you for the answer, im studying about!

Collapse
 
vitorsm19 profile image
Vitor Mesquita

Both SPA (Single Page Application) and MPA (Multiple Page Application) can be used with microfront-end architecture. SPA is a better choice for microfront-end architecture because it allows for better performance, faster load times, and a more seamless user experience. SPA also allows for easier maintenance and development because it requires less code than MPA. However, MPA can be used if you have a large application with many pages that require different functionality. In this case, MPA can be used to separate functionality into different pages...

Collapse
 
gianlucasms profile image
gianlucasms

Don't you think it depends? because it all depends on the application because SPA can be better in performance for you to use only one HTML file, but when you make an MPA application it can be better in terms of scalability, because each page can be cached independently, reducing the load on the server and improving performance in high traffic situations.

Collapse
 
gianlucasms profile image
gianlucasms

but i think everything depends of the application, both are good for cases.