Method and device for building micro front-end application

By defining micro-application tags and creating shadow document object models, the problem of selector conflict and DOM structure separation in the micro-frontend framework is solved, and flexible micro-frontend application rendering and efficient communication are achieved.

CN113760324BActive Publication Date: 2025-04-15BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
2 Cites 0 Cited by

Patent Information

Application Number
CN202110449508.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-25
Publication Date
2025-04-15
Estimated Expiration
2041-04-25

AI Technical Summary

Technical Problem

Existing micro front-end frameworks such as single-spa and qiankun have selector conflict problems and the problem of separation of sub-applications and main application DOM structure caused by iframes, and the configuration is complex and not flexible enough.

Method used

By defining micro-application tags and creating a shadow document object model, generating micro-application web native components, responding to micro-front-end application construction operations, obtaining static resources of sub-applications and inserting them into the shadow document object model, to introduce sub-applications in the main application.

Benefits of technology

It solves the problem of selector conflict and DOM structure separation, lowers the configuration threshold, and realizes that a line of code can render micro front-end applications, with high communication efficiency and flexibility.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The present invention discloses a method and device for building a micro-front-end application, and relates to the field of computer technology. A specific implementation of the method includes: defining a micro-application tag, and creating a shadow document object model through the micro-application tag to generate a micro-application web native component; in response to the micro-front-end application construction operation, obtaining static resources under the sub-application domain name according to the domain name address of the sub-application; inserting the static resources into the shadow document object model to render the elements of the sub-application into the shadow document object model to introduce the sub-application into the main application. This implementation can solve the selector conflict problem and the problem of separation of the sub-application from the main application DOM structure, and there is no need to monitor route changes, and it can be rendered anywhere on the page, thereby reducing the configuration threshold, and realizing that a line of code can render the micro-front-end application, with high communication efficiency and flexible implementation.
Need to check novelty before this filing date? Find Prior Art