Move workbench microfrontend support to a separate plugin
danielwiehl opened this issue · 1 comments
Is your feature request related to a problem? Please describe.
The SCION Workbench comes with built-in microfrontend support implemented directly in the package @scion/workbench
.
This is not optimal for the following reasons:
- Violates the SOLID programming principle, especially the "Single Responsibility Principle".
- The SCION Workbench depends on the
SCION Microfrontend Platform
and theSCION Workbench Client
(remote API used by a micro app to interact with the workbench), which is particularly confusing for applications using the SCION Workbench standalone (i.e., not implementing a microfrontend-based architecture at all). - The host application can access both the
SCION Workbench
andSCION Workbench Client
APIs. Both APIs have similar-sounding services (e.g.WorkbenchRouter
,WorkbenchView
, ...), which often leads to confusion about when to use which API. To make matters worse, not all services of theSCION Workbench Client
make sense to be used in the host app (e.g. self-navigation in the Workbench Router, View context, ...). - There is a risk that workbench and workbench microfrontend support will be too tightly coupled, making it difficult to replace the microfrontend integration technique in the future.
- It is not possible to use an alternative microfrontend integration technique.
Describe the solution you'd like
A pluggable microfrontend support would be preferable. This means that the @scion/workbench
no longer has a built-in microfrontend implementation and no longer has a dependency on the @scion/microfrontend-platform
and @scion/workbench-client
. Instead, the workbench should provide API to extend the workbench with microfrontend support using a pluggable architecture. In consequence, the current workbench microfrontend integration would be moved to a plugin released as a separate NPM package.
Proposal to configure the SCION Workbench with microfrontend support (inspired by Angular):
provideWorkbench(
withWorkbenchConfig(workbenchConfig),
withWorkbenchMicrofrontendIntegration(workbenchMicrofrontendConfig)
);