What even is a micro frontend?
Jerod and KBall are joined by Micro Frontends in Action author Michael Geers to discuss (you guessed it) micro frontend architecture. We ask: what is the concept? How is it similar/different to micro services? Who is it best fitted for? How do you put it in practice? And much more.
Discussion
Sign in or Join to comment or subscribe
Shailesh Mangal
2020-04-04T07:56:49Z ago
Great show, very informative. Its certainly an interesting trend that is slowly becoming necessity. One of the things I was hoping Michael would have talked was around SSO and sharing data amongst diff micro sites. Another point that was discussed was around the deploying the change. Is the idea of micro-frontend registries, discovery of new version, dynamic loading and remote deployment a common one?
Michael Geers
Osnabrück, Germany
2020-04-04T08:49:21Z ago
Thanks sxm20.
SSO
A common way for auth is, that one team is the authentication provider (signup, users, …) and you have a defined way (oauth, jwt, …) to give other teams access to the login information. For easier access its also common to expose non critical auth information (is user logged in, name of user) though a global variable or JS API.
Sharing data
We try do not share application data at all because it introduces coupling. Changing a shared data-structure might break other peoples code.
We share global context information (auth, lang, env, country, …) with all micro frontends and use events between them to notify each other. But we usually don’t transfer complex data structures via events.
Registry
There are frameworks that introduce the concept of a global registry. You definitely need a central scheme for global routing (which micro frontend is responsible for this URL?). In our projects this it not that complex. One team owns global routing (e.g. load-balancer) and other teams issue MRs to them when something needs to change. If you’ve a lot of teams/micro frontends the value of a registry increases.
Versions
We don’t have a formal way for versioning. Changes in a micro frontend are deployed and visible immediately. We try to avoid breaking changes in the contracts between the team (signature of a fragment, layout assumptions, …). Sometimes this is not possible. Then the involved teams (producer, consumers) coordinate directly.
Shailesh Mangal
2020-04-09T18:41:45Z ago
Thanks for the response Michael,
I am trying to come up with a UI framework/architecture that can cater to rapidly evolving landscape where each developer can build SPAs and toss them over (some kind of webComponent or elements) without having to worry about Auth, Navigation etc. Framework would take care of life cycle, by passing login credentials, current context (selected project/account etc) and providing a event bridge to communicate. End Users can witness these new pages as Tabs and decide to keep them or hide them. Some of these pages would have short life cycle and they can be expired; Others will have inflow of more feature and they will grow to be more main stream.
This is not a new concept and has been done with different market places via plugins e.g. Salesforce, Jenkins, JIRA etc. I want to see if micro-frontends can make it a reality without writing massive UI and backend frameworks.
Do you know if something like this exists or would this be an idea for an open source project?
Mayank K
2020-04-20T03:07:04Z ago
Really a nice conversation giving lots of insights on MFs. I am excited about the book 😊
Liz
2020-05-02T05:09:42Z ago
Thanks for this interview! I’ve been curious about the microfront ends and what they actually are. I am interested in learning more about the deployment process.
Emanuel Suriano
Buenos Aires, Argentina
Full stack developer –> React and .Net
2020-06-30T17:05:44Z ago
Amazing episode guys! In my company we’re also using micro frontend and I have a very similar experience as Michael. I would love to take a look at his book to dive deep more on what he talked in the podcast!