Reader small image

You're reading from  Building Micro Frontends with React 18

Product typeBook
Published inOct 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781804610961
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Vinci J Rufus
Vinci J Rufus
author image
Vinci J Rufus

Vinci Rufus is a VP for technology at Publicis Sapient. He has spent over 25 years building web applications using various technologies. He has been focused on building micro frontends for about half a decade and has successfully built and managed micro frontend-based applications for a few large clients. He was formerly a Google Developer Expert and has had the opportunity to speak at numerous conferences on modern frontend and cloud-native technologies.
Read more about Vinci J Rufus

Right arrow

Choosing a suitable pattern

Now that we have a broad understanding of the two patterns of microfrontends, let’s spend some time on some of the key considerations that will help you decide which pattern to go with.

While there may be numerous points of view on what is right, how far to think into the future, and how to future-proof your app and architecture, we believe there are two primary factors that will help you decide on which of the two patterns to go with for your microfrontend architecture. Let’s look at them in detail in the following sections.

Team Composition

For teams that build applications on microservices and microfrontends, it is a common practice that they are vertically sliced based on business functionality. In the e-commerce example, we may have a team that focuses on the browsing journey and another team that focuses on the checkout journey. If one scrum team owns the entire browser journey and one scrum team owns the entire checkout journey, then it is recommended that you go for the multi-SPA pattern. However, if you have numerous small teams that own different entities of the business domain, such as, say, search, product recommendations, and promotions, then it would be wise to go for the micro apps pattern. As mentioned earlier, the rule of thumb is for each scrum team to ideally own a single micro app.

Frequency of Deployments

Another factor that would come into play when deciding how to break down your microfrontend would be the frequency of deployments. If there are specific sections of the app that change more than others, then those sections can be separated into its own microfrontend, which can be separately deployed without affecting the other sections of the app. This reduces the amount of testing that needs to be done because now we need to test only the micro app that is being changed and not the entire application.

As we can see, the decision on whether you should go for a multi-SPA pattern or the micro apps pattern boils down to the two key factors of team composition and deployment frequency, and this is directly related to the two keywords from the definition of microfrontend, namely, independent teams and independent deployments.

Previous PageNext Page
You have been reading a chapter from
Building Micro Frontends with React 18
Published in: Oct 2023Publisher: PacktISBN-13: 9781804610961
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime

Author (1)

author image
Vinci J Rufus

Vinci Rufus is a VP for technology at Publicis Sapient. He has spent over 25 years building web applications using various technologies. He has been focused on building micro frontends for about half a decade and has successfully built and managed micro frontend-based applications for a few large clients. He was formerly a Google Developer Expert and has had the opportunity to speak at numerous conferences on modern frontend and cloud-native technologies.
Read more about Vinci J Rufus