CN115840598A - Micro front-end architecture system, development method, device and medium based on application market - Google Patents

Micro front-end architecture system, development method, device and medium based on application market Download PDF

Info

Publication number
CN115840598A
CN115840598A CN202211294173.XA CN202211294173A CN115840598A CN 115840598 A CN115840598 A CN 115840598A CN 202211294173 A CN202211294173 A CN 202211294173A CN 115840598 A CN115840598 A CN 115840598A
Authority
CN
China
Prior art keywords
micro
application
management module
applications
function
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
CN202211294173.XA
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.)
Shanghai Yilide Information Technology Co ltd
Original Assignee
Shanghai Yilide Information Technology 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 Shanghai Yilide Information Technology Co ltd filed Critical Shanghai Yilide Information Technology Co ltd
Priority to CN202211294173.XA priority Critical patent/CN115840598A/en
Publication of CN115840598A publication Critical patent/CN115840598A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

  • Stored Programmes (AREA)

Abstract

The present disclosure relates to a micro front end architecture system based on an application market, a development method, a device and a medium, the micro front end architecture system comprising a micro application management module, a micro function management module, an application market management module and a micro application configuration management module; the micro application management module is used for searching and acquiring micro applications from an application market and installing the micro applications in a micro front-end platform; the micro-function management module is used for searching and acquiring micro-functions from an application market and is installed in the micro front-end platform; the application market management module is used for managing application market link information, storing micro applications and micro function publishing packages, and realizing retrieval and downloading of the micro applications and the micro functions from an application market; the micro application configuration management module is used for reading and analyzing micro application configuration information, aggregating and managing the configuration information of all micro applications and providing micro application configuration information of the micro front-end platform for the main application. The main application, the micro application and the micro function can be independently developed, and the collaborative development capability is improved.

Description

Micro front-end architecture system, development method, device and medium based on application market
Technical Field
The present disclosure relates to the field of front-end development, and in particular, to a micro front-end architecture system, development method, device, and medium based on an application market.
Background
With the development of the internet, the application is complex and changeable, a large application is disassembled into a plurality of service components with independent responsibilities through micro-services, a plurality of business service components are expanded according to needs under a micro-service architecture, and business service component projects are cooperated to complete a large project architecture, so that the whole architecture has good expansion capability, a complex business system is simplified, and the system has better maintainability. The development of the front-end field relative to the micro-service field seems to be unable to keep pace with some of the development, most of the current architectures still aim at the macro-monomer application of the separation of the front end and the back end of all the back-end businesses, with the continuous increase of the business volume, the front-end project will be evolved more and more, developers of different business modules focus on the macro-monomer application, the collaborative development easily generates conflict, the code maintenance is difficult, the expansion is difficult, the construction time is longer and longer, one module is expected to be deployed during construction, but the content developed by other teams is easily introduced, so that some unknown problems and risks are introduced.
Disclosure of Invention
The utility model provides a little front end architecture system, development method, equipment and medium based on application market, can solve a series of problems such as front end project volume is getting bigger and bigger, project cooperation development maintenance is difficult, is difficult to expand, and the construction time is long, and the range of change is difficult to be defined. The present disclosure provides the following technical solutions to solve the above technical problems:
as an aspect of the embodiments of the present disclosure, a micro front end architecture system based on an application market is provided, which is applied to a micro front end management platform, and includes a micro application management module, a micro function management module, an application market management module, and a micro application configuration management module;
the micro application management module is used for searching and acquiring micro applications from an application market and installing the micro applications in a micro front-end platform;
the micro-function management module is used for searching and acquiring micro-functions from an application market and is installed in the micro front-end platform;
the application market management module is used for managing application market link information, storing micro applications and micro function publishing packages, and realizing retrieval and downloading of the micro applications and the micro functions from an application market;
the micro application configuration management module is used for reading and analyzing micro application configuration information, aggregating and managing the configuration information of all micro applications, and providing micro application configuration information of a micro front-end platform for a main application, wherein the micro application configuration information is used for dynamically configuring the configuration of the application, configuring the micro applications according to different business requirements, and changing the configuration information under the condition of not modifying micro application codes.
Preferably, the micro application management module is further configured to: in the installation process, whether other applications depending on the micro-application are installed or not and whether the versions of the applications are matched or not are checked;
and/or managing the version of the micro application to realize the online version upgrading and version rollback of the micro application;
and/or managing the micro-application to be online and offline.
Preferably, the micro-function management module is configured to: managing the version of the micro function, and realizing the online version upgrade and the version rollback of the micro function;
and/or managing the micro-applications to be online and offline.
Preferably, the application market management module is configured to provide the micro front-end platform with application installation information and application configuration information.
Preferably, the main application, the micro application and the micro function are all independent publishing packages.
As another aspect of the embodiments of the present disclosure, a micro front-end architecture development method based on application market is provided for developing the above system, including the following steps:
the application market management module manages application market link information and stores micro applications and micro-function publishing packages;
finding and obtaining a publishing package of the micro-application and/or the micro-function from an application market, decompressing the publishing package and making the main application accessible;
reading and analyzing the configuration information of the micro application and/or the micro function, providing the micro application configuration information of the micro front-end platform for the main application, wherein the micro application configuration information is used for dynamically configuring the configuration of the application, configuring the micro application according to different service requirements, and changing the configuration information under the condition of not modifying a micro application code.
Preferably, the configuration information includes metadata configuration information and application configuration information;
and/or, decompressing the publishing packet and making it accessible to the host application, further comprising the steps of: and the application market management module decompresses the publishing packet in an accessible directory provided by the Web service, so that the main application can be accessed by the http request.
As another aspect of the embodiments of the present disclosure, a micro-front-end architecture system based on an application market is provided, which is applied to a micro-front-end main application, and includes a micro-application lifecycle module, a micro-application registration module, and a routing management distribution module;
the lifecycle of the micro application lifecycle module comprises five stages of micro application registration, execution before micro application initialization, micro application initialization completion execution and micro application uninstallation;
the micro application registration module is used for defining micro function information, micro application dependency management and life cycle stages contained in micro applications, sequentially executing the three stages before micro application initialization, micro application initialization and micro application initialization after all the micro applications submit registration information, combing the execution sequence according to the micro application dependency relationship, and entering the next stage after all the micro applications are executed in one stage until all the three stages are executed;
and the routing management distribution module is used for routing the operation in the five stages of the life cycle of the micro application to the corresponding storage directory.
As another aspect of the embodiments of the present disclosure, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of the application market-based micro front-end architecture development method.
As another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described application market-based micro-front-end architecture development method.
Compared with the prior art, the beneficial effects of this disclosure are: the method comprises the steps of splitting a large single front-end application into a plurality of independent applications according to a mode of one main application and a plurality of micro applications, splitting each application into independent micro function packages according to different service ranges, forming one independent micro application by a plurality of functions, and forming a complete service system by the plurality of micro applications under the coordination of the main application. The main application, the micro application and the micro function in the system can be independently developed, so that the cooperative development capability is improved, and the interference among teams is reduced; the construction is independent, the coupling of construction content is reduced, and the construction speed is increased; and the system is independently installed and deployed, so that the deployment flexibility is improved, and unknown problems and risks caused by application deployment are avoided.
Drawings
Fig. 1 is a schematic architecture diagram of an application market-based micro-front-end architecture system according to embodiment 1 of the present disclosure;
fig. 2 is a schematic diagram of the packet division of the NPM packet of the main application, the micro application and the micro function in embodiment 1 of the present disclosure;
fig. 3 is a schematic diagram of storage directories in the nodjs Web service of the main application, the micro application, and the micro function in embodiment 1 of the present disclosure;
fig. 4 is a schematic view of the life cycle of the micro application in embodiment 3 of the present disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of a, B, and C, and may mean including any one or more elements selected from the group consisting of a, B, and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
It is understood that the above-mentioned embodiments of the method of the present disclosure can be combined with each other to form a combined embodiment without departing from the principle logic, which is limited by the space, and the detailed description of the present disclosure is omitted.
In addition, the present disclosure also provides a micro front end architecture system based on an application market, an electronic device, a computer readable storage medium, and a program, which can all be used to implement any one of the micro front end architecture development methods based on an application market provided by the present disclosure, and the corresponding technical solutions and descriptions and corresponding descriptions in the method section are not repeated.
The main body of the application market-based micro front-end architecture development method may be a computer or other apparatuses capable of implementing the application market-based micro front-end architecture, for example, the method may be executed by a terminal device or a server or other processing device, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, and the like. In some possible implementations, the application marketplace-based micro-front end architecture development method may be implemented by a processor calling computer-readable instructions stored in a memory.
Example 1
As an aspect of an embodiment of the present disclosure, there is provided a micro front end architecture system based on an application market, as shown in fig. 1, including: the system comprises a micro application management module, a micro function management module, an application market management module and a micro application configuration management module.
The micro application management module is used for searching and acquiring micro applications from an application market and installing the micro applications in a micro front-end platform;
the micro-function management module is used for searching and acquiring micro-functions from an application market and is installed in the micro front-end platform;
the application market management module is used for managing application market link information, storing micro applications and micro function publishing packages, and realizing retrieval and downloading of the micro applications and the micro functions from an application market;
the micro application configuration management module is used for reading and analyzing micro application configuration information, aggregating and managing the configuration information of all micro applications, and providing micro application configuration information of a micro front-end platform for a main application, wherein the micro application configuration information is used for dynamically configuring the configuration of the application, configuring the micro applications according to different business requirements, and changing the configuration information under the condition of not modifying micro application codes.
In this embodiment, a single front-end application is split into multiple independent applications according to a mode of one main application and multiple micro applications, each application can be split into independent micro function packages according to different service ranges, the multiple functions form one independent micro application, and the multiple micro applications form a complete service system under the coordination of the main application. The main application, the micro application and the micro function in the system can be independently developed, so that the cooperative development capability is improved, and the interference among teams is reduced; the construction is independent, the coupling of construction content is reduced, and the construction speed is increased; and the system is independently installed and deployed, so that the deployment flexibility is improved, and unknown problems and risks caused by application deployment are avoided.
Each module of the disclosed embodiment is described in detail below.
In this embodiment, the micro application management module: the micro-application searching and acquiring device is used for searching and acquiring micro-applications from an application market and installing the micro-applications in a micro front-end platform; the method is used for checking whether other applications depended by the micro application are installed or not and whether the versions of the other applications are matched or not in the installation process; the method is used for managing the version of the micro application and realizing the online version upgrading and version rollback of the micro application. The method is used for managing the online and offline of the micro-application.
In this embodiment, the micro function management module: the similar micro-application management module is used for searching and acquiring micro-functions from an application market and is installed in the micro front-end platform; the method is used for managing the version of the micro application and realizing the online version upgrading and version rollback of the micro function. The method is used for managing the on-line and off-line of the micro function.
In this embodiment, the application market management module: the system is used for managing application market link information and storing micro applications and micro function publishing packages. The system is used for realizing retrieval from an application market and downloading micro applications and micro functions; the method is used for providing application installation information and application configuration information for the micro front-end platform. The application market warehouse in this embodiment may be an NPM warehouse, but is not limited to the NPM warehouse.
In this embodiment, the micro application configuration management module: the micro front-end platform is used for reading and analyzing micro application configuration information, aggregating and managing the configuration information of all micro applications and providing micro application configuration information of the micro front-end platform for the main application. The micro application configuration information is used for dynamically configuring the configuration of the application, the micro application is configured according to different service requirements, and the configuration information is changed under the condition that micro application codes are not modified. For example, simple scenario: whether a log function is supported; and the implementation code of the way of obtaining the service token in the complex scene.
In the following, the present embodiment takes nodjs as an embodiment for providing backend Web services, but is not limited to this embodiment.
And communicating the NPM warehouse by using the application market link information maintained by the application market management module to obtain operation authorization information for operating the NPM warehouse, and using the authorization information as a certificate to provide an interface access certificate for the micro application and the micro function management module. The NPM repository link information typically includes: NPM warehouse address and port, warehouse name, account number, password and other information. If other repositories are used as examples, the information will be slightly different.
In this embodiment, the main application, the micro application, and the micro function are independent NPM packages, different NPM packages can be independently developed, operated and maintained by different teams, and can be issued to an NPM warehouse after being constructed, and all the uploaded NPM packages can be retrieved, downloaded, and the like through the previously acquired operation authorization information. Since the main application, the micro application and the micro front end are all stored in the same NPM warehouse, in order to distinguish the three NPM packets, and correctly load the resources of the micro application and the micro function in the routing part of the micro application and the micro function, as shown in fig. 2, in this embodiment, the three different NPM packets are respectively placed in different NPM groups, the main application uses a micro-web group, the micro application uses a micro-apps group, and the micro function uses a micro-modules group. After the micro application and the micro function are installed, the micro application and the micro function are also put into a folder named by a group as a part of a path for loading resources during routing. The example NPM group used in this embodiment.
In this embodiment, when the micro front-end platform application is initialized, the NPM package of the main application is downloaded or locally uploaded from the application market, and the main application is installed. During installation, the application market management module decompresses the NPM packet in an accessible directory provided by the nodess Web service, so that the content of the host application can be accessed through an http request. In this embodiment, a public directory generally used by a Web application is used as a Web accessible directory. After the main application is decompressed, the application market management module analyzes and manages the packet version information of the NPM packet of the main application, and the packet version information is used as the version information of the micro front-end main application and is recorded in an application information table.
The main maintained field information in the application information table includes: application name, application grouping, description information, version, standardized version, configuration information, version dependency information, whether it is a master application, whether it is in an online state, installation time, and the like.
The standardized version is version information obtained by standardizing version information, such as: 1.2.3, obtaining a main version number, a characteristic version number and a patch version number by dividing according to the 'version', and respectively completing the version numbers of the three parts by left-side digits. In this example, 6-bit padding is used, and less than 6 bits are used to pad "0", and the results are concatenated. The standardized version 000001.000002.000003 is finally obtained. After the lengths are unified, comparison is convenient to be carried out on the version numbers, whether a new version higher than the current version exists or not is determined, and version updating is carried out by using the new version. The embodiment is not limited to the 3-segment version number rule, and different version number rules can be used according to the version number convention, but the rights claimed in the embodiment are not affected.
And the version dependence information is used for the micro application management module and the micro function management module, checking whether the dependence relation of the installed NPM package is satisfied, and if the dependent package is not installed, installing the related package in an automatic mode or uploading the related package in a manual mode.
Whether it is a primary application or not, for distinguishing the primary application from the micro-application.
And if the micro application and the micro function are in the online state, the micro application and the micro function are used for being online or downloaded, and the main application only loads the micro application and the micro function in the online state.
In this embodiment, in the micro application management module, the micro application may download or locally upload the NPM package of the micro application from the application market and install the micro application. As shown in FIG. 3, during installation, the application marketplace management module will decompress the NPM packet of the micro application into the micro-apps directory of the resource directory provided by the NodeJS Web service. Similarly, at the micro-function management module, the micro-function may download or locally upload the NPM package of the micro-function from the application marketplace and install the micro-function. In the installation process, the application market management module decompresses the NPM packet of the micro function in the micro-modules directory of the resource directory provided by the NodeJS Web service.
In this embodiment, after the micro application is installed in the micro application configuration management module, the micro application metadata configuration information is read, and the configuration information is stored in the application configuration information table as the original configuration information. And the micro application configuration management module reads all application configuration information and renders a configuration form, and a user configures related configuration parameters according to the service characteristics, stores the configuration result in the micro application configuration form as final configuration information of the micro application and determines the running state configuration of the micro application.
In some embodiments, the metadata configuration information and application configuration information table should contain: configuration item key, configuration name, configuration description, default value, rendering type, optional value, etc. Wherein the configuration item key is used for the front-end to obtain the configuration. The name and description are used for user configuration to prompt the user for explanatory information. The default value is used to set default options when the user is not configured. The rendering type is used for configuring the rendering mode of the item and is used together with the selectable value, and when the rendering type is textarea, textarea multi-line text control is used for rendering; when the text is text, rendering by using an input single-line text control; when the value is selected, rendering by using a Select single-selection or multi-selection control, wherein the selectable value is used as a selectable value of the Select; when the value is Radio, rendering by using a Radio control, and taking the selectable value as a Radio selectable value; when the Checkbox is adopted, rendering is carried out by using a Checkbox multi-selection control, and the selectable value is used as a Radio selectable value; and so on. The embodiment is not limited to the above rendering types, and is extensible according to business requirements.
In some embodiments, the micro-application configuration table may include: configuration item key, configuration item value and the like. The micro front-end main application can access the interface provided by the NodeJS Web service to obtain the configuration information of all the micro applications, and the configuration information is injected into the context of the front end for service logic use.
Example 2
As an aspect of the embodiments of the present disclosure, there is provided a micro front end architecture development method based on an application market, for developing the system in embodiment 1, including the following steps:
the application market management module manages application market link information and stores micro applications and micro-function publishing packages;
finding and obtaining a publishing packet of the micro-application and/or the micro-function from an application market, decompressing the publishing packet and making the main application accessible;
reading and analyzing the configuration information of the micro application and/or the micro function, providing the micro application configuration information of the micro front-end platform for the main application, wherein the micro application configuration information is used for dynamically configuring the configuration of the application, configuring the micro application according to different service requirements, and changing the configuration information under the condition of not modifying a micro application code.
In this embodiment, the configuration information includes metadata configuration information and application configuration information;
in this embodiment, decompressing the distribution package and making the host application accessible, further includes the following steps: and the application market management module decompresses the publishing packet in an accessible directory provided by the Web service, so that the main application can be accessed by the http request.
In this embodiment, the micro application configuration management module is configured to read and analyze micro application configuration information, aggregate and manage configuration information of all micro applications, and provide micro application configuration information of the micro front-end platform for the main application. The micro application configuration information is used for dynamically configuring the configuration of the application, the micro application is configured according to different service requirements, and the configuration information is changed under the condition that micro application codes are not modified. For example, simple scenarios: whether a log function is supported; and the implementation code of the way of obtaining the service token in the complex scene.
In this embodiment, after the master application is decompressed, the application market management module may analyze and manage the NPM packet package version information of the master application, and the NPM packet package version information is used as version information of the micro front-end master application and is recorded in the application information table together with the version information.
The main maintained field information in the application information table includes: application name, application grouping, description information, version, standardized version, configuration information, version dependency information, whether it is a master application, whether it is in an online state, installation time, and the like.
In this embodiment, the standardized version is version information obtained by standardizing version information, such as: 1.2.3, dividing the version information according to the 'version', acquiring a main version number, a characteristic version number and a patch version number, and performing left-side digit completion on the version numbers of the three parts respectively. In this example, 6-bit padding is used, and less than 6 bits are used to pad "0", and the results are concatenated. The standardized version 000001.000002.000003 is finally obtained. After the lengths are unified, comparison is convenient to be carried out on the version numbers, whether a new version higher than the current version exists or not is determined, and version updating is carried out by using the new version. The embodiment is not limited to the 3-segment version number rule, and different version number rules can be used according to the version number convention, but the rights claimed in the embodiment are not affected.
And the version dependence information is used for the micro application management module and the micro function management module, checking whether the dependence relation of the installed NPM package is satisfied, and if the dependent package is not installed, installing the related package in an automatic mode or uploading the related package in a manual mode.
Whether it is a primary application or not, for distinguishing the primary application from the micro-application.
And if the micro application and the micro function are in the online state, the micro application and the micro function are used for being online or downloaded, and the main application only loads the micro application and the micro function in the online state.
In this embodiment, in the micro application management module, the micro application may download or locally upload the NPM package of the micro application from the application market and install the micro application. In the installation process, the application market management module decompresses the NPM packet of the micro application in the micro-apps directory of the resource directory provided by the NodeJS Web service. Similarly, at the micro-function management module, the micro-function may download or locally upload the NPM package of the micro-function from the application marketplace and install the micro-function. In the installation process, the application market management module decompresses the NPM packet of the micro function in the micro-modules directory of the resource directory provided by the NodeJS Web service.
In this embodiment, after the micro application is installed in the micro application configuration management module, the micro application metadata configuration information is read, and the configuration information is stored in the application configuration information table as the original configuration information. And the micro application configuration management module reads all application configuration information and renders a configuration form, and a user configures related configuration parameters according to the service characteristics, stores the configuration result in the micro application configuration form as final configuration information of the micro application and determines the running state configuration of the micro application.
In some embodiments, the metadata configuration information and application configuration information table should contain: configuration item key, configuration name, configuration description, default value, rendering type, optional value, etc. Wherein the configuration item key is used for the front-end to obtain the configuration. The name and description are used for user configuration to prompt the user for explanatory information. The default value is used to set default options when the user is not configured. The rendering type is used for configuring the rendering mode of the item and is used together with the selectable value, and when the rendering type is textarea, textarea multi-line text control is used for rendering; if the text is text, rendering by using an input single-line text control; when the value is selected, rendering by using a Select single-selection or multi-selection control, wherein the selectable value is used as a selectable value of the Select; when the Radio is available, rendering by using a Radio control, and taking the selectable value as a Radio selectable value; when the Checkbox is adopted, rendering is carried out by using a Checkbox multi-selection control, and the selectable value is used as a Radio selectable value; and so on. The embodiment is not limited to the above rendering types, and is extensible according to business requirements.
The micro-application configuration table may include: configuration item key, configuration item value and the like. The micro front-end main application can access the interface provided by the NodeJS Web service to obtain the configuration information of all the micro applications, and the configuration information is injected into the context of the front end for service logic use.
Example 3
As another aspect of the embodiments of the present disclosure, a micro-front-end architecture system based on an application market is provided, which is applied to a micro-front-end main application, and includes a micro-application lifecycle module, a micro-application registration module, and a routing management distribution module;
as shown in fig. 4, the lifecycle in the micro application lifecycle module includes five stages, i.e., micro application registration, micro application pre-initialization execution, micro application initialization completion execution, and micro application uninstallation;
the micro application registration module is used for defining micro function information, micro application dependency management and life cycle stages contained in micro applications, sequentially executing the three stages before micro application initialization, micro application initialization and micro application initialization after all the micro applications submit registration information, combing the execution sequence according to the micro application dependency relationship, and entering the next stage after all the micro applications are executed in one stage until all the three stages are executed;
and the routing management distribution module is used for routing the operation in the five stages of the life cycle of the micro application to the corresponding storage directory.
In some embodiments, the micro application registration phase mainly defines micro function information contained in the micro application, micro application dependency management and the life cycle phase. One micro application can be formed by combining a plurality of micro functions, and the micro functions can be independently installed through the micro function management module to upgrade the micro functions in the micro application. The dependency relationship may exist among the micro-application dependencies, and the micro-application dependency management module determines the loading processing sequence of different micro-applications in a life cycle stage through analysis of the dependency relationship, so that the dependent micro-applications can execute processing in a limited manner. It is ensured that no initialization execution errors are caused by execution order confusion.
In some embodiments, after all the micro applications submit the registration information, the three stages of execution before the initialization of the micro applications, the initialization of the micro applications and the completion of the initialization of the micro applications are sequentially performed, the execution sequence is sorted according to the dependency relationship of the micro applications, and after all the micro applications are performed in one stage, the next stage is performed until all the three life cycle stages are performed completely.
And when the micro application needs to be unloaded, triggering a micro application unloading life cycle and finishing the micro application unloading.
In some embodiments, the access micro front end platform loads an entry in the host application by default and executes initialization logic. The main initialization logic is that the NodeJS Web service is accessed to obtain a micro application information interface, and installed and online micro application information, installed and online micro function information and micro application configuration information are obtained. And storing the micro application configuration information in the micro front-end platform main application, and providing a query configuration interface for the micro application and the micro function to use. The lifecycle phase of the micro-application registration is performed based on the micro-application information that has been installed and is online.
In some embodiments, when the micro application is registered, according to the micro function included in the registration information, the micro front-end platform main application may determine a storage path where the micro function is located, and the storage path is determined according to a group to which the micro function belongs, for example, the micro function demo-module is stored in a/micro-modules/demo-module directory. When accessing the resource files in the micro-functions, the routing management distribution module routes the resource files into/micro-modules/demo-modules.
Similarly, after installing the micro-application, the micro-application market places the micro-application resource file under the micro-application installation directory/micro-apps. For example, when accessing the resource file in the micro application demo-app, the routing management distribution module will route to the/micro-apps/demo-app directory.
In some embodiments, when the micro function is installed, the routing management distribution module may preferentially route to the installation directory where the micro function is located. When the micro function is not installed, the routing management distribution module routes to the micro function directory in the micro application where the micro function is located.
Example 4
The present embodiment provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the application market-based micro front-end architecture development method in embodiment 2.
Embodiment 4 of the present disclosure is merely an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present disclosure.
The electronic device may be embodied in the form of a general purpose computing device, which may be, for example, a server device. Components of the electronic device may include, but are not limited to: at least one processor, at least one memory, and a bus connecting different system components (including the memory and the processor).
The bus includes a data bus, an address bus, and a control bus.
The memory may include volatile memory, such as Random Access Memory (RAM) and/or cache memory, and may further include read-only memory (ROM).
The memory may also include program means having a set of (at least one) program modules including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The processor executes various functional applications and data processing by executing computer programs stored in the memory.
The electronic device may also communicate with one or more external devices (e.g., keyboard, pointing device, etc.). Such communication may be through an input/output (I/O) interface. Also, the electronic device may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via a network adapter. The network adapter communicates with other modules of the electronic device over the bus. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module, according to embodiments of the application. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 4
The present embodiment provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the application market-based micro-front-end architecture development method of embodiment 2.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation manner, the present disclosure may also be implemented in the form of a program product, which includes program code for causing a terminal device to execute the steps of implementing the application market based micro front end architecture development method described in embodiment 2, when the program product runs on the terminal device.
Where program code for carrying out the disclosure is written in any combination of one or more programming languages, the program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
Although embodiments of the present disclosure have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations may be made in these embodiments without departing from the principles and spirit of the disclosure, the scope of which is defined in the appended claims and their equivalents.

Claims (10)

1. The micro front end architecture system based on the application market is applied to a micro front end management platform and is characterized by comprising a micro application management module, a micro function management module, an application market management module and a micro application configuration management module;
the micro application management module is used for searching and acquiring micro applications from an application market and installing the micro applications in a micro front-end platform;
the micro-function management module is used for searching and acquiring micro-functions from an application market and is installed in the micro front-end platform;
the application market management module is used for managing application market link information, storing micro applications and micro function publishing packages, and realizing retrieval and downloading of the micro applications and the micro functions from an application market;
the micro application configuration management module is used for reading and analyzing micro application configuration information, aggregating and managing the configuration information of all micro applications, providing micro application configuration information of the micro front-end platform for the main application, configuring the micro applications according to different business requirements, and changing the configuration information under the condition of not modifying micro application codes.
2. The micro-front-end architecture system of an application marketplace of claim 1, wherein the micro-application management module is further to: in the installation process, whether other applications depending on the micro-application are installed or not and whether the versions of the applications are matched or not are checked;
and/or managing the version of the micro application to realize the online version upgrading and version rollback of the micro application;
and/or managing the micro-applications to be online and offline.
3. The micro-front-end architecture system for an application marketplace of claim 1, wherein the micro-function management module is to: managing the version of the micro function, and realizing the online version upgrade and the version rollback of the micro function;
and/or managing the micro-applications to be online and offline.
4. The micro-front-end architecture system of an application marketplace according to any of claims 1-3, wherein the application marketplace management module is to provide application installation information and application configuration information for a micro-front-end platform.
5. The micro front-end architecture system of an application marketplace according to any of the claims 1-3, wherein the master application, micro application, and micro function are all independent publishing packages.
6. A micro front end architecture development method based on application market for developing a system according to any one of claims 1 to 5, comprising the steps of:
the application market management module manages application market link information and stores micro applications and micro-function publishing packages;
finding and obtaining a publishing package of the micro-application and/or the micro-function from an application market, decompressing the publishing package and making the main application accessible;
reading and analyzing the configuration information of the micro application and/or the micro function, providing the micro application configuration information of the micro front-end platform for the main application, wherein the micro application configuration information is used for dynamically configuring the configuration of the application, configuring the micro application according to different service requirements, and changing the configuration information under the condition of not modifying a micro application code.
7. The application marketplace-based micro-front-end architecture development method of claim 6, wherein the configuration information includes metadata configuration information and application configuration information;
and/or, decompressing the publishing packet and making it accessible to the host application, further comprising the steps of: and the application market management module decompresses the release packet in an accessible directory provided by the Web service so that the main application can be accessed through an http request.
8. The micro front end architecture system based on the application market is applied to micro front end main application and is characterized in that the micro front end architecture system comprises a micro application life cycle module, a micro application registration module and a routing management distribution module;
the life cycle of the micro application life cycle module comprises five stages of micro application registration, micro application pre-initialization execution, micro application initialization completion execution and micro application unloading;
the micro application registration module is used for defining micro function information, micro application dependency management and life cycle stages contained in micro applications, sequentially executing the three stages before micro application initialization, micro application initialization and micro application initialization after all the micro applications submit registration information, combing the execution sequence according to the micro application dependency relationship, and entering the next stage after all the micro applications are executed in one stage until all the three stages are executed;
and the routing management distribution module is used for routing the operation in the five stages of the life cycle of the micro application to the corresponding storage directory.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the application marketplace based micro front end architecture development method of claim 6 or 7 when executing the computer program.
10. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the application market-based micro-front-end architecture development method of claim 6 or 7.
CN202211294173.XA 2022-10-21 2022-10-21 Micro front-end architecture system, development method, device and medium based on application market Pending CN115840598A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211294173.XA CN115840598A (en) 2022-10-21 2022-10-21 Micro front-end architecture system, development method, device and medium based on application market

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211294173.XA CN115840598A (en) 2022-10-21 2022-10-21 Micro front-end architecture system, development method, device and medium based on application market

Publications (1)

Publication Number Publication Date
CN115840598A true CN115840598A (en) 2023-03-24

Family

ID=85576482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211294173.XA Pending CN115840598A (en) 2022-10-21 2022-10-21 Micro front-end architecture system, development method, device and medium based on application market

Country Status (1)

Country Link
CN (1) CN115840598A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117251200A (en) * 2023-09-11 2023-12-19 中国人民解放军军事科学院战争研究院 Composite application integration method based on micro-application

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117251200A (en) * 2023-09-11 2023-12-19 中国人民解放军军事科学院战争研究院 Composite application integration method based on micro-application

Similar Documents

Publication Publication Date Title
US8245185B2 (en) System and method for software delivery
US20020069263A1 (en) Wireless java technology
US20150128106A1 (en) Software Builder
US20090300604A1 (en) System and method for building virtual appliances using a repository metadata server and a dependency resolution service
US20040158577A1 (en) System and method for cross platform and configuration build system
US20170351507A1 (en) Silent upgrade of software with dependencies
EP3812889A1 (en) Method for generating difference between new and old data in order to update software, and device therefor
US20160380920A1 (en) Dynamically generating solution stacks
CN110688096B (en) Method and device for constructing application program containing plug-in, medium and electronic equipment
JP7119096B2 (en) license verification device
CN115840598A (en) Micro front-end architecture system, development method, device and medium based on application market
CN109408471B (en) Compressed packet decompression method and device based on matching tree and storage medium
US10318262B2 (en) Smart hashing to reduce server memory usage in a distributed system
CN115794214B (en) Application module metadata management method, device, storage medium and apparatus
CN111459506A (en) Deployment method, device, medium and electronic equipment of deep learning platform cluster
CN114860202A (en) Project operation method, device, server and storage medium
CN110502276A (en) Service packs generation method, device, equipment and computer readable storage medium
CN113722538B (en) Interface dynamic rendering method and device
KR102361534B1 (en) Method and system for obfuscation using compiler
CN111625232B (en) Method and device for generating application program installation package, readable medium and electronic equipment
US11340897B1 (en) Subject matter expert identification for computer software
US11853750B2 (en) Subject matter expert identification and code analysis based on a probabilistic filter
CN114924809B (en) DEX file class-based streaming micro-service loading verification method
CN117573111A (en) Micro-service deployment method, device, equipment and storage medium
CN117742703A (en) Path updating method and device for page rendering file 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