How to realize the release and release of functional modules based on Web

recently I encountered a problem in my work, which is described as follows:

We plan to build a functional platform based on Web, where users can develop their own modules and publish them to the system for others to use, or customize the functional modules they need to use.

now I have a lot of questions about how to achieve this requirement, such as: how the user develops and publishes the modules he has developed, and how the platform loads the functional modules he needs according to the user"s customization.

now I think of two ways to compare the implementation of low. I hope the bosses will show us a clear way

  1. users develop a simple functional module for a single page, and then the functional platform uses iframe to load the code that runs the functional module.
  2. or, instead of using iframe, dynamically load the code snippet of the functional module and then merge it into the HTML of the Web platform.

because our Web development is mainly carried out using React, we think today that we may be able to use server-side rendering technology such as renderToString in React to render modules written in React submitted by others into HTML strings and then pass them to the front end. However, such HTML code snippets cannot be directly embedded into the Web platform for execution. So there"s still a problem.

I hope the bosses will show us a clear way


now I have a lot of questions about how to achieve this requirement, such as: how the user develops and publishes the modules he develops, and how the platform loads the functional modules he needs according to his customization.

isn't this confirmed by the business / marketing / operations department?


plugin form. Specifically, take a look at the usage of dz plugin center

.
Menu