Building a MicroFrontend setup using Angular 12: Part 4 — Some caveats of learning along with way

Jonathan Cardoz
3 min readFeb 24, 2022

--

Photo by Andrew Neel on Unsplash

Disclaimer: This is my first set of articles on Medium and since I haven’t blogged or written anything (other than social media posts or restaurant reviews) for a couple of years, please bear with me. Comments are welcome.

I hope this set of articles helps you in understanding Micro Frontends (referred to as MFEs from now on), to setup your project and not make the same set of mistakes that my team and I did.

The other articles in the series are linked below

In the final article of the series, I list out the learnings and gotchas that accompanied us on the journey of building and setting up the MFE.

Remember to always understand a requirement before going with the MFE approach

TLDR: Perform some amount of research before proceeding with the MicroFrontend setup.

While using a MFE might sound cool because everyone else is building one, it is not always the correct or appropriate solution. A simple application consisting of 2–3 modules would not necessitate the need for setting up a MFE.

You can achieve the same functionality using lazy loaded modules, which will allow for you to structure your application based on the functionality, and also prevent a large bundle size on load — by only loading the initial module, and then load the others as the user interacts with your application.

As this sections title clearly states, deduce the overall need before going ahead with this kind of approach.

Choose the framework best suited for the job

TLDR: Choose the framework that best suits your team and project.

The right tool makes the job seem easier. This series of articles outlines the MFE approach using Angular — but the same can be done using React or Vue as well. Determine which framework you want to use based on the team as well as the requirement. Your team should be comfortable in working within the particular framework as well — as they will spend majority of time building standard functionality, as well as learning the nuances of MFE.

Welcome to the new (hello) world

TLDR: this is new ground — so be aware that there will be times when you might get stuck.

This technology is new to the market — and people are yet to make it mainstream. So in some instances, you might face challenges which do not have a proven solution. So be ready to save yourself in cases where Google or StackOverflow does not have the answer. However, in most cases, there is a nice developer who has written an article about it — which will help save you some time.

Thanks so much for reading. You made it to the end. I hope that you enjoyed this set of articles. If they helped you, leave a clap and share with your friends.

--

--