Thoughts on Linking MFE apps together and Genetic Ties between them.

HowardHoward
2 min read

There is no strict rule about Architecture

The architecture for each project is determined by its requirements.

We must think about the requirements to pick the architecture will work for us.

With the project I currently working on, there are some unflexible requirements.

1) ZERO Coupling between Child Projects

๐Ÿ‘‰ NO import of functions/objects / classes / etc

๐Ÿ‘‰ NO Shared State

๐Ÿ‘‰ Shared libraries through MF is OK

2) NEAR ZERO coupling between CONTAINER and CHILD APPS

๐Ÿ‘‰ CONTAINER shouldn't assume that a CHILD is Using a PARTICULAR framework. Try to be genetic as much as possible.

๐Ÿ‘‰ Any necessary Communication is done with callbacks or Simple Events.

3) CSS from one project shouldn't affect another.

4) VERSION CONTROL (monorepo vs Separate REPOS) shoudn't have any impact on the overall project

5) Container should be ABLE to decide to ALWAYS use the LATEST version of a micro Frontend or specify a Specific version

๐Ÿ‘‰ Container will ALWAYS use the LATEST version of a CHILD app (does not require a Re-deploy of Container)

๐Ÿ‘‰ Container can SPECIFY EXACTLY WHAT VERSION of a child it wants to use (requires a re-deploy to change)


Things to keep in mind

When we try to link multiple micro Frontend apps together (integration).

Specifically, during the integration process of child apps (REMOTE) into the Container (HOST).

We shouldn't assume that the child apps are using a particular framework.

Instead, we want to make the "coupling" between the HOST and the REMOTES as GENETIC and as SIMPLE as possible.

As much as you can, try to avoid Coupling Software together.

The more you can isolate your different applications, the better off you're gonna be in some number of years.

It might sound clichรฉ when we just need to work with small pieces of software.

However, this architecture choice can have a massive impact on large-scale software.

3
Subscribe to my newsletter

Read articles from Howard directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Howard
Howard

๐Ÿ™‹โ€โ™‚๏ธ I'm a Software Engineer, Voracious Reader, Writer (tech, productivity, mindset), LOVE Fitness, Piano, Running.๐Ÿ’ป Started coding professionally in 2020 as a full-time Frontend engineer. โš—๏ธ I make things in the messy world of JS, Computer Science, and Software Engineering more digestible. Or I would like to say โ€œDistilledโ€ ๐Ÿ“น Documenting my learning journey, and working experience along the way. Share how I learn and build my personal projects.