Discussion

Sign in or Join to comment or subscribe

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?

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.

  • stay healthy, Michael

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?

Player art
  0:00 / 0:00