CN116186450A - Micro front-end application system, application rendering method, device and storage medium - Google Patents

Micro front-end application system, application rendering method, device and storage medium Download PDF

Info

Publication number
CN116186450A
CN116186450A CN202211603636.6A CN202211603636A CN116186450A CN 116186450 A CN116186450 A CN 116186450A CN 202211603636 A CN202211603636 A CN 202211603636A CN 116186450 A CN116186450 A CN 116186450A
Authority
CN
China
Prior art keywords
application
resource
module
public
resources
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211603636.6A
Other languages
Chinese (zh)
Inventor
赵庆伟
胥斌
王彤
黄少飞
李雨鑫
杜爱红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wangtai Technology Development Co ltd
Original Assignee
Beijing Wangtai Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Wangtai Technology Development Co ltd filed Critical Beijing Wangtai Technology Development Co ltd
Priority to CN202211603636.6A priority Critical patent/CN116186450A/en
Publication of CN116186450A publication Critical patent/CN116186450A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application discloses a micro front-end application system, an application rendering method, equipment and a storage medium, wherein the system comprises the following components: the basic application module further comprises: sharing a remote module; the basic application module is constructed with one or more micro front-end applications; the shared remote module is used as a shared resource pool, is constructed with public resources on which the micro front-end application depends, and is provided with a remote container inlet for the micro front-end application in the basic application module to access; and the micro front-end application is configured with resource declaration information of the dependent public resources during construction, and the micro front-end application obtains the required public resources through the remote container entry based on the resource declaration information during loading operation. According to the system, the remote sharing module is used as a shared resource pool, so that the main application and each sub-application can asynchronously load public resources, only the application itself is built when the application is built, and the problem of repeated construction of the public resources can be effectively reduced.

Description

Micro front-end application system, application rendering method, device and storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a micro front end application system, an application rendering method, an apparatus, and a storage medium.
Background
The front-end is the part of the Web system that interacts directly with the user, and the micro front-end architecture is an architecture similar to micro services. In particular, the method can be regarded as a technical architecture for integrating a plurality of applications into a large-scale application.
For the micro front-end application under the micro front-end architecture, the basic model comprises a main application (also called a container application) and one or more sub-applications (also called micro applications), wherein the main application is mainly used for managing the sub-applications, remote loading and rendering of the sub-applications and application unloading can be realized, and each sub-application can be regarded as an independent application with complete service capability, and the provided remote entry files share the main application for file loading and rendering.
In the micro front-end application, normal operation of one sub-application also needs to depend on some public resources, such as a basic framework, a function tool library, a UI component library and the like, and in the rendering implementation of the sub-application used in the prior art, the complete sharing of the public resources cannot be realized due to limited processing capacity. Meanwhile, in the existing processing method of public resources, the public resources are required to be introduced into each sub-application in the form of constructing a private packet, and the problem of repeated construction of the resources exists; in addition, by means of concentrating public resources into the base, the problem that the loading volume of the base is too large to influence the loading response time of the first screen and influence the access experience of a user can be solved.
Disclosure of Invention
The embodiment of the application provides a micro front-end application system, an application rendering method, application rendering equipment and a storage medium, and the function that a main application and each sub-application can asynchronously load public resources is realized through a shared resource pool.
In a first aspect, the present invention provides a micro front-end application system, including:
the basic application module is constructed with one or more micro front-end applications;
the shared remote module is used as a shared resource pool, is constructed with public resources on which the micro front-end application depends, and is provided with a remote container inlet for the micro front-end application in the basic application module to access;
and the micro front-end application is configured with resource declaration information of the dependent public resources during construction, and the micro front-end application obtains the required public resources through the remote container entry based on the resource declaration information during loading operation.
In a second aspect, an embodiment of the present invention provides a micro front end application rendering method, which is executed by the micro front end application system provided in the first aspect of the embodiment of the present invention, where the method includes:
after receiving an application access request of a webpage end, determining a main application in the constructed micro front-end application, and accessing a shared resource pool according to resource statement information configured in the main application to obtain a main application public resource;
after the main application is loaded based on the main application public resource and the main application resource, determining a sub-application to be loaded according to the route change;
sub-application resources are obtained and loaded from the server of the sub-application to be loaded, and sub-application public resources are obtained according to resource statement information configured in the sub-application to be loaded;
and carrying out application rendering on the sub-application to be loaded based on the sub-application resource and the sub-application public resource.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, as an execution device in a micro front-end application system, including:
one or more processors;
storage means for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the micro front end application rendering method provided by the embodiments of the present disclosure.
In a fourth aspect, the presently disclosed embodiments also provide a storage medium containing computer-executable instructions that, when executed by a computer processor, are for performing a micro front end application rendering method that implements the presently disclosed embodiments.
The embodiment of the application discloses a micro front-end application system, an application rendering method, application rendering equipment and a storage medium. The system comprises: the basic application module further comprises: sharing a remote module; the basic application module is constructed with one or more micro front-end applications; the shared remote module is used as a shared resource pool, is constructed with public resources on which the micro front-end application depends, and is provided with a remote container inlet for the micro front-end application in the basic application module to access; and the micro front-end application is configured with resource declaration information of the dependent public resources during construction, and the micro front-end application obtains the required public resources through the remote container entry based on the resource declaration information during loading operation. According to the technical scheme, the remote sharing module is used as the resource pool, so that the main application and each sub-application can asynchronously load the public resource, only the application itself is built when the application is built, and the problem of repeated construction of the public resource can be effectively reduced.
It should be understood that the description of this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of a micro front-end application system according to an embodiment of the disclosure;
FIG. 2 is a diagram of dependency relationships between applications and shared remote modules in a micro front end application system according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a micro front end application rendering method according to an embodiment of the disclosure.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a schematic structural diagram of a micro front-end application system according to an embodiment of the present disclosure, where the system is suitable for use in the case of micro front-end application construction.
As shown in fig. 1, a micro front-end application system 1 includes: the basic application module 11 further includes: sharing the remote module 12;
the basic application module 11 is constructed with one or more micro front-end applications.
The shared remote module 12, as a shared resource pool, is built with common resources on which the micro front-end applications depend, and is provided with a remote container portal for access by the micro front-end applications in the base application module.
The micro front-end application is configured with resource declaration information of the dependent public resources during construction, and the micro front-end application obtains the required public resources through a remote container entry based on the resource declaration information during loading operation.
The micro front-end application system 1, the basic application module 11, provided by the embodiment of the invention, is constructed with one or more micro front-end applications. As shown in fig. 1, the basic application module 11 is included in the micro front end architecture. For a micro front-end application system 1, its basic model features the construction of a main application, and one or more sub-applications. The main application is mainly used for loading remote sub-applications and executing rendering and unloading operations in the sub-applications, and the sub-applications can be regarded as an independent application with complete business capability, and the main application is provided with file loading through the provided remote entry files.
The shared remote module 12, as a shared resource pool, is built with common resources on which the micro front-end applications depend, and is provided with a remote container portal for access by the micro front-end applications in the base application module.
In this embodiment, each application in the micro front-end architecture is independently developed and deployed, but is still a product, and there is a common resource that is reused in the development work. Common resources may include: as with the technology stack dependent base frame, the base frame may include a header, a footer, a menu, etc. A library of function tools, a library of generic UI components, a library of service-specific components, etc., not limited to a technology stack. The remote container portal may be a call portal that allows a consuming module or application to make calls and use common resources. A remote container portal is provided in the shared remote module 12 for access by micro front end applications in the base application module.
FIG. 2 is a diagram of dependency relationships between applications and shared remote modules in a micro front end application system according to an embodiment of the present disclosure; as shown in fig. 2, the common resources in the shared remote module 12 are divided by resource types, including a tool function module 121, a base dependency module 122, and a UI component module 123; the tool function module 121 includes a set of tool function resources unrelated to the sub-use framework; the base dependency module 122 includes a base dependency function resource set on which the base framework of the sub-application depends; including the set of function resources on which page headers, page footers, menus, etc. in the base frame depend. The UI component module 123 includes therein a component function resource set of the UI framework involved in the sub-use. Wherein the UI framework may include Bootstrap, jQuery UI, semantic UI, and the like. The UI component functions in UI component module 123 have a dependency requirement on common resources in tool function module 121 and/or base dependency module 122.
The micro front-end application is configured with resource declaration information of the dependent public resources during construction, and the micro front-end application obtains the required public resources through a remote container entry based on the resource declaration information during loading operation.
In this embodiment, the resource declaration information may be access address information or an identification information. The use of micro front-end applications is configured with resource declaration information of the dependent common resources at build time. As shown in fig. 2, when a main application or a sub-application is loaded, an asynchronous request is made in the manner of the report standard syntax. The required common resources can be obtained from the shared remote module 12 through the remote container portal based on the resource declaration information. The UI component functions may also obtain the required common resources from the tool function module 121 and/or the base dependency module 122 through the dependency resource declaration information configured at build time.
The embodiment of the invention provides a micro front-end application system, which comprises: the basic application module further comprises: sharing the remote module 12; the basic application module is constructed with one or more micro front-end applications; the shared remote module 12 is used as a shared resource pool, builds public resources on which the micro front-end application depends, and provides a remote container inlet for the micro front-end application in the basic application module to access; the micro front-end application is configured with resource declaration information of the dependent public resources during construction, and the micro front-end application obtains the required public resources through a remote container entry based on the resource declaration information during loading operation. According to the system, the remote sharing module is used as a resource pool, so that the main application and each sub-application can asynchronously load public resources, only the application itself is built when the application is built, and the problem of repeated construction of the public resources can be effectively reduced.
The micro front-end application system may further include a resource cache region that caches the common resources that are first accessed and loaded by the micro front-end application in the shared remote module 12 for use as a preferred access object when the micro front-end application loads the common resources. When receiving an application loading instruction, accessing a resource cache area; when the needed public resources are found out from the resource cache area, the public resources are directly loaded from the resource cache area; otherwise, the required common resources are invoked from the shared remote module 12 through the remote container portal based on the configured resource declaration information and cached to the resource cache.
Specifically, when a public resource is accessed and loaded by the micro front-end application for the first time, the public resource is cached in a resource cache area. The public resource in the resource buffer area is used as a first-choice access object when the micro front-end application loads the public resource. When receiving an application loading instruction, firstly accessing a resource cache region, searching the needed public resources from the resource cache region, and if the public resources can be searched, directly loading the public resources from the resource cache region; otherwise, the required common resources are invoked from the shared remote module 12 through the remote container portal based on the configured resource declaration information and cached to the resource cache.
The system comprises a resource cache region, when the needed public resources are found out from the resource cache region, the public resources are directly loaded from the resource cache region, and response consumption caused by repeated loading is reduced.
Specifically, after receiving an application access request from a webpage end, a slave server requests a master application resource, then analyzes relevant configuration information of the master application resource, asynchronously loads required shared resources by using an import standard grammar, and then further renders the master application. Determining a sub application needing to be loaded through route change, and acquiring and loading resources of the sub application from a server, wherein when the shared resources are acquired through configuration, the shared resources can be preferentially checked whether the needed resources have cache resources through a cache technology, if so, the cache resources are responded, response consumption caused by repeated loading is reduced, and if not, or the cache resources are expired, the corresponding resources are requested and cached, and final rendering and response are performed.
Example two
Fig. 3 is a flowchart of a micro front-end application rendering method according to an embodiment of the present disclosure, where the method is applicable to the case of constructing a micro front-end application.
As shown in fig. 3, a micro front end application rendering method provided in the second embodiment of the present application may specifically include the following steps:
step 201, after receiving an application access request of a web page end, determining a main application in the constructed micro front-end application, and accessing a shared resource pool according to resource statement information configured in the main application to obtain a main application public resource.
Specifically, after receiving an application access request of a webpage end, determining a master application in the constructed micro front-end application, requesting master application resources from a server, analyzing relevant configuration information of the master application resources, and asynchronously loading required shared resources according to resource declaration information configured in the master application by using an import standard grammar to obtain master application public resources.
Before the loading of the main application is completed based on the main application public resource and the main application resource, the method further comprises the following steps: and accessing a corresponding server according to the main application identifier of the main application to obtain main application resources.
And accessing a corresponding server according to the main application identifier of the main application to obtain main application resources. The main application identifier is used for identifying a server corresponding to the main application. For example, when the main application is hundred degrees, the corresponding main application resource is acquired from the server resource entering the hundred degrees.
Meanwhile, before obtaining the public resource of the main application, the method further comprises the following steps: and caching the public resources of the main application into a resource cache area.
Step 202, determining a sub-application to be loaded according to the route change after finishing the loading of the main application based on the main application public resource and the main application resource.
In this embodiment, in this step, after the main application is loaded based on the main application public resource and the main application resource, the sub-application to be loaded is determined according to the route change.
Step 203, sub-application resources are obtained and loaded from a server of the sub-application to be loaded, and sub-application public resources are obtained according to resource statement information configured in the sub-application to be loaded.
Correspondingly, obtaining the sub-application public resource according to the resource declaration information configured in the sub-application to be loaded comprises the following steps: accessing a resource cache region, and determining whether the resource cache region comprises matched public resources; if yes, loading the needed public resources directly from the resource cache area; if not, determining the calling address of the required public resource based on the resource declaration information, calling the required public resource from the public resource pool through the remote container entry, and caching the resource into the resource cache area.
Specifically, the resources of the sub-application are obtained and loaded from the server of the sub-application to be loaded, at this time, when the shared resources are obtained through configuration, the shared resources can be preferentially checked by a caching technology, if so, the required public resources are directly loaded from the resource cache area, if not, or the cached resources are expired, the calling address of the required public resources is determined based on the resource declaration information, and the required public resources are called from the public resource pool through a remote container entry and cached to the resource cache area.
And 204, performing application rendering on the sub-application to be loaded based on the sub-application resources and the sub-application public resources.
In this embodiment, this step is used to perform application rendering on the sub-application to be loaded based on the sub-application resource and the sub-application common resource.
According to the technical scheme, the public resources in the public resource pool are utilized by the method, so that the main application and each sub-application can asynchronously load the public resources, only the application itself is built when the application is built, and the problem of repeated construction of the public resources can be effectively reduced.
Example III
Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the micro front end application rendering method.
In some embodiments, the micro-front-end application rendering method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the micro-front-end application rendering method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the micro-front-end application rendering method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solutions of the present application are achieved, and the present application is not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (10)

1. A micro front-end application system, comprising: the basic application module is characterized by further comprising: sharing a remote module;
the basic application module is constructed with one or more micro front-end applications;
the shared remote module is used as a shared resource pool, is constructed with public resources on which the micro front-end application depends, and is provided with a remote container inlet for the micro front-end application in the basic application module to access;
and the micro front-end application is configured with resource declaration information of the dependent public resources during construction, and the micro front-end application obtains the required public resources through the remote container entry based on the resource declaration information during loading operation.
2. The system of claim 1, wherein the common resources in the shared remote module are divided by resource type, including a tool function module, a base dependency module, and a UI component module;
the tool function module comprises a tool function resource set which is irrelevant to the sub-application framework;
the base dependency module comprises a base dependency function resource set on which a base framework of the sub-application depends;
the UI component module comprises a component function resource set of a UI framework related to the sub-application.
3. The system of claim 2, wherein UI component functions in the UI component module have dependent requirements on common resources in the tool function module and/or base dependent module;
the UI component functions obtain the required public resources from the tool function modules and/or the basic dependency modules through the dependency resource declaration information configured at the time of construction.
4. The system of claim 1, wherein the resource cache,
and the resource cache area is used for caching the public resource which is accessed and loaded by the micro front-end application for the first time in the shared remote module, so as to be used as a first-choice access object when the micro front-end application loads the public resource.
5. The system according to claim 4, wherein the micro front-end application is specifically configured to:
when an application loading instruction is received, accessing the resource cache area;
when the needed public resources are searched from the resource cache area, the public resources are directly loaded from the resource cache area; otherwise the first set of parameters is selected,
and calling the required public resources from the shared remote module through the remote container entry based on the configured resource declaration information, and caching the resources in the resource cache area.
6. A micro front-end application rendering method, performed by the micro front-end application system of any of claims 1-5, comprising:
after receiving an application access request of a webpage end, determining a main application in the constructed micro front-end application, and accessing a shared resource pool according to resource statement information configured in the main application to obtain a main application public resource;
after the main application is loaded based on the main application public resource and the main application resource, determining a sub-application to be loaded according to the route change;
sub-application resources are obtained and loaded from the server of the sub-application to be loaded, and sub-application public resources are obtained according to resource statement information configured in the sub-application to be loaded;
and carrying out application rendering on the sub-application to be loaded based on the sub-application resource and the sub-application public resource.
7. The method of claim 6, further comprising, prior to completing the host application loading based on the host application common resource and host application resources:
and accessing a corresponding server according to the main application identifier of the main application to obtain the main application resource.
8. The method of claim 6, further comprising, prior to obtaining the primary application common resource:
caching the public resources of the main application into a resource cache region;
correspondingly, the obtaining the sub-application public resource according to the resource declaration information configured in the sub-application to be loaded includes:
accessing a resource cache region, and determining whether the resource cache region comprises matched public resources;
if yes, loading the needed public resources directly from the resource cache area;
and if not, determining the calling address of the required public resource based on the resource declaration information, calling the required public resource from the public resource pool through the remote container entry, and caching the resource into the resource cache area.
9. An electronic device, characterized by being an execution device in the micro front-end application system according to any of claims 1-5, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the micro front end application rendering method of any one of claims 6-8.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the micro front end application rendering method of any one of claims 6-8 when executed.
CN202211603636.6A 2022-12-13 2022-12-13 Micro front-end application system, application rendering method, device and storage medium Pending CN116186450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211603636.6A CN116186450A (en) 2022-12-13 2022-12-13 Micro front-end application system, application rendering method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211603636.6A CN116186450A (en) 2022-12-13 2022-12-13 Micro front-end application system, application rendering method, device and storage medium

Publications (1)

Publication Number Publication Date
CN116186450A true CN116186450A (en) 2023-05-30

Family

ID=86437394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211603636.6A Pending CN116186450A (en) 2022-12-13 2022-12-13 Micro front-end application system, application rendering method, device and storage medium

Country Status (1)

Country Link
CN (1) CN116186450A (en)

Similar Documents

Publication Publication Date Title
CN112540806B (en) Method and device for rendering small program page, electronic equipment and storage medium
CN114116065B (en) Method and device for acquiring topological graph data object and electronic equipment
CN114816393B (en) Information generation method, device, equipment and storage medium
CN112817660B (en) Method, device, equipment and storage medium for expanding applet capability
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN116186450A (en) Micro front-end application system, application rendering method, device and storage medium
CN114510334A (en) Class instance calling method and device, electronic equipment and automatic driving vehicle
CN113691403A (en) Topological node configuration method, related device and computer program product
CN112905270A (en) Workflow implementation method, device, platform, electronic equipment and storage medium
CN116579914B (en) Execution method and device of graphic processor engine, electronic equipment and storage medium
US12026541B2 (en) Method for applet page rendering, electronic device and storage medium
US20230359483A1 (en) Method for applet page rendering, electronic device and storage medium
CN114268558B (en) Method, device, equipment and medium for generating monitoring graph
CN114428646B (en) Data processing method and device, electronic equipment and storage medium
CN117632545A (en) Data sharing method and device of business system and electronic equipment
CN116341663A (en) Extension method, device, equipment and medium of deep learning reasoning framework
CN116578801A (en) Page rendering method and device, electronic equipment and storage medium
CN117806619A (en) Data processing method, device, electronic equipment and medium
CN117520092A (en) Log data determining method and device, electronic equipment and medium
CN116010744A (en) Page data processing method and device, electronic equipment and readable storage medium
CN117251419A (en) File monitoring method and device, electronic equipment and storage medium
CN117406964A (en) Data architecture model design method, device, electronic equipment and storage medium
CN113378166A (en) Method and device for calling Application Program Interface (API) of operating system
CN116360892A (en) Function expansion method, device, equipment and medium of distributed service system
CN117806702A (en) Target software acquisition method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination