Use-Cases for Frontend Plugins
What we’re looking to solve
There should be a clear separation of the Frontend Plugin from the Host MFE that it would “live” in.
This would isolate teams from each other’s work, which we recognize has been an issue for the open source community and 2U-internal development across several teams.
The Frontend Plugin should be deployed and maintained by the team that created it, as opposed to the team that is responsible for the Host MFE.
This allows teams to deploy independently while working in the same user interface.
The only major change that should be made in the Host MFE is the configuration for the space in which the Frontend Plugin would exist, so that the Host Team would only need to review that which they were already maintaining.
Host team defines the Plugin Slot’s space and location, while the plugin renders within that defined space.
If there is a breaking change in the Frontend Plugin, the Host MFE should not be affected or prevented from being built/rendered.
This would cut down on unnecessary communication between any teams working in the same Host MFE.
What our Frontend Plugin Framework accomplishes
The first version will use iFrame-based plugins to render the “child” MFE’s component into the Host MFE.
The Frontend Plugin Framework lives in its own library that is maintained independently from the MFEs.
Very few dependencies are needed for the Framework, but this allows for a dedicated team to maintain and improve on the Framework over time while making sure that all teams are able to agree on the plugin configuration.
A Frontend Plugin receives the component it needs to render via a route in the “child” MFE, and Frontend Plugins can only be added to Plugin Slots in the Host MFE.
This ensures the actual work lives separately from the Host MFE and that the Host MFE team is only responsible for making a Plugin Slot available.
Immediate example: We would extract the Recommendations panel.
Example: The team that maintains Learner Record MFE would like to display the learner’s record inside Profile MFE, which is maintained by another team (“host”). The Profile team would create make a Plugin Slot available on the Profile page (
/u/{learner_username})
, which the Learner Record team would then provide with the route to their Learner Record component (/record/{learner_username}/plugin
).
Host MFE owners are responsible for maintaining and owning PluginSlot extension points.