Methods, devices, electronic devices, media, and program products for orchestrating front-end applications
By parsing and orchestrating metadata from subpages of different front-end applications, a micro-front-end architecture is generated, solving the problem of how to build and manage front-end applications with multiple microservices. This enables composite front-end applications that are easy to manage and deploy, reduces development costs, and supports cross-platform operation.
Patent Information
- Application Number
- CN201980098925.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-29
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2039-09-29
AI Technical Summary
How to effectively utilize dozens or even hundreds of microservices to build a unified front-end application, especially how to manage and deploy these microservices to build a micro-front-end architecture, presents challenges with existing technologies.
By parsing the pre-stored orchestration file, all the subpages to be referenced by the front-end application to be orchestrated are determined. Based on the metadata of these subpages, the front-end application is orchestrated, the main page framework is generated, subpage routes are added, the compiler is called to compile, and finally a deployable front-end application package is generated.
It enables the creation of a composite front-end application that is easy to manage and deploy, saves development costs, and is platform-independent, capable of running on different types of front-end browsers.
Smart Images

Figure CN114207575B_ABST
Abstract
Description
Technical Field
[0001] This disclosure generally relates to the field of network technology, and more specifically, to methods, apparatus, electronic devices, media, and program products for orchestrating front-end applications. Background Technology
[0002] Microservices are currently the mainstream approach to scalable system architecture. When implementing a microservices architecture, keeping services small, independent, and reusable is good practice for building comprehensive applications. This also applies to front-end application architectures. However, things become more complex when microservices are needed as building blocks for front-end solutions. How to use dozens, or sometimes hundreds, of microservices to build a unified website or mobile application becomes a challenge. Summary of the Invention
[0003] A brief overview of the invention is given below to provide a basic understanding of certain aspects of it. It should be understood that this overview is not an exhaustive summary of the invention. It is not intended to identify key or essential parts of the invention, nor is it intended to limit the scope of the invention. Its purpose is merely to present certain concepts in a simplified form as a prelude to the more detailed description that follows.
[0004] In view of the above, this disclosure proposes a solution for orchestrating a front-end application using subpages from different front-end applications, thereby constructing a micro-front-end architecture.
[0005] According to one aspect of this disclosure, a method for orchestrating a front-end application is provided, comprising: reading and parsing a pre-stored orchestration file to determine all subpages to be referenced by the front-end application to be orchestrated; for each subpage, determining the metadata of the subpage according to the orchestration file; and orchestrating the front-end application based on all the determined subpages.
[0006] Optionally, in one example of the above aspects, before reading and parsing the pre-stored orchestration file, the method further includes: parsing the routes of the existing front-end application to extract metadata of each subpage of the existing front-end application and storing it as registration information.
[0007] Optionally, in one example of the above aspects, the orchestration file defines at least one subpage to be referenced by the front-end application and the metadata of each subpage. The metadata of each subpage defined in the orchestration file is determined based on stored registration information.
[0008] Optionally, in one example of the above aspects, determining the metadata of the subpage according to the orchestration file includes at least: determining the name of the subpage and the route of the subpage according to the orchestration file.
[0009] Optionally, in one example of the above aspects, determining the metadata of the subpage based on the orchestration file further includes at least one of the following operations: determining the values of the configuration parameters of the subpage based on the orchestration file; and generating authentication and authorization information for the subpage.
[0010] Optionally, in one example of the above aspects, orchestrating the front-end application based on all determined subpages includes: generating a frame for the main page of the front-end application based on a pre-stored application template or a user-defined application template; filling the content area of the frame with all determined subpages, and adding the route of each subpage to the navigation panel of the frame; and calling the compiler corresponding to each subpage to compile the subpages to generate a front-end application package to be deployed. Wherein, for one or more subpages belonging to the same existing front-end application, the corresponding compiler is used to compile each of the one or more subpages separately, or to compile the multiple subpages together.
[0011] Optionally, in one example of the above aspects, orchestrating the front-end application based on all the identified subpages before generating the front-end application package to be deployed further includes generating global authentication and authorization information for the front-end application.
[0012] Optionally, in one example of the above aspects, the method further includes: deploying the front-end application package to be deployed into an application container or into a mobile application store.
[0013] According to another aspect of this disclosure, an apparatus for orchestrating a front-end application is provided, comprising: a subpage determination unit configured to read and parse a pre-stored orchestration file to determine all subpages to be referenced by the front-end application to be orchestrated; a metadata determination unit configured to determine the metadata of each subpage based on the orchestration file; and an orchestration unit configured to orchestrate the front-end application based on all determined subpages.
[0014] Optionally, in one example of the above aspects, the apparatus further includes: an initialization unit configured to parse the routes of an existing front-end application to extract metadata of each subpage of the existing front-end application and store it as registration information.
[0015] Optionally, in one example of the above aspects, the orchestration file defines at least one subpage to be referenced by the front-end application and metadata for each subpage, wherein the metadata for each subpage defined in the orchestration file is determined based on stored registration information.
[0016] Optionally, in one example of the above aspects, the metadata determination unit is further configured to determine the name of the subpage and the route of the subpage based on the orchestration file.
[0017] Optionally, in one example of the above aspects, the metadata determination unit is further configured to perform at least one of the following operations: determining the values of configuration parameters for the subpage based on the orchestration file; and generating authentication and authorization information for the subpage.
[0018] Optionally, in one example of the above aspects, the orchestration unit is further configured to: generate a framework of the main page of the front-end application based on a pre-stored application template or a user-defined application template; populate the content area of the framework with all determined subpages, and add the route of each subpage to the navigation panel of the framework; and call the compiler corresponding to each subpage to compile the subpages to generate a front-end application package to be deployed. Specifically, for one or more subpages belonging to the same existing front-end application, the corresponding compiler is used to compile each of the one or more subpages separately, or to compile the multiple subpages together.
[0019] Optionally, in one example of the above aspects, the orchestration unit is further configured to generate global authentication and authorization information for the front-end application.
[0020] Optionally, in one example of the above aspects, the apparatus further includes a deployment unit configured to deploy the front-end application package to be deployed into an application container or into a mobile application store.
[0021] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory coupled to said at least one processor, said memory for storing instructions that, when executed by said at least one processor, cause the processor to perform the method as described above.
[0022] According to another aspect of this disclosure, a non-transitory machine-readable storage medium is provided that stores executable instructions, which, when executed, cause the machine to perform the method described above.
[0023] According to another aspect of this disclosure, a computer program is provided, including computer-executable instructions that, when executed, cause at least one processor to perform the method described above.
[0024] According to another aspect of this disclosure, a computer program product is provided, which is tangibly stored on a computer-readable medium and includes computer-executable instructions that, when executed, cause at least one processor to perform the method as described above.
[0025] According to the method and apparatus disclosed herein, a solution is provided for orchestrating front-end applications using subpages from different front-end applications, thereby constructing a micro-front-end architecture. This allows the use of both previously developed front-end applications in traditional languages and newer front-end applications developed in newer languages to build a composite front-end application. Front-end applications constructed in this way are easier to manage and deploy, and can save development costs.
[0026] Front-end applications programmed according to the methods and apparatus of this disclosure are platform-independent and therefore can run widely on different types of front-end browsers. Attached Figure Description
[0027] The above and other objects, features, and advantages of the present invention will be more readily understood by referring to the following description of embodiments of the invention in conjunction with the accompanying drawings. The components in the drawings are merely for illustrating the principles of the invention. In the drawings, the same or similar technical features or components will be represented by the same or similar reference numerals.
[0028] Figure 1 A schematic diagram of the application page framework is shown;
[0029] Figure 2 This is a flowchart illustrating an exemplary process of a method for orchestrating a front-end application according to an embodiment of the present disclosure;
[0030] Figure 3 This is a flowchart illustrating an exemplary process of the operation in block S206;
[0031] Figure 4 This is a block diagram illustrating an exemplary configuration of an apparatus for orchestrating a front-end application according to an embodiment of the present disclosure;
[0032] Figure 5 This is a block diagram illustrating an exemplary configuration of a front-end application orchestration system according to an embodiment of the present disclosure; and
[0033] Figure 6 A block diagram of an electronic device for orchestrating front-end applications according to embodiments of the present disclosure is shown.
[0034] Figure Labels
[0035] 100: Application page frame 102: Page title
[0036] 104: Content Area 106: Navigation Panel
[0037] S201, S202, S204, S206, S208, S2062, 200: Methods for orchestrating front-end applications
[0038] S2064, S2066, S2068: Steps
[0039] 400: Device for orchestrating front-end applications
[0040] 402: Subpage Determination Unit; 404: Metadata Determination Unit
[0041] 406: Arrangement Unit; 401: Initialization Unit
[0042] 408: Deployment Unit; 500: Front-end Application Orchestration System
[0043] 501, 502, 503: Existing front-end applications; 5012, 5022, 5032: Routes
[0044] 504: Registry Center 505: Orchestrator Module
[0045] 506: Arrangement Files 507: Layout Module
[0046] 5014, 5024, 5034: Compilers; 509: Application Container
[0047] 5091, 5092...509m: Front-end application; A1, A2, An, B1, B2, Bn, C1, C2, Cn: Subpages
[0048] 510: Message Bus 511: Local Memory
[0049] 602: Processor; 604: Memory
[0050] 600: Electronic devices Detailed Implementation
[0051] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed merely to enable those skilled in the art to better understand and implement the subject matter described herein, and are not intended to limit the scope, applicability, or examples set forth in the claims. The function and arrangement of the elements discussed may be changed without departing from the scope of this disclosure. Various processes or components may be omitted, substituted, or added as needed in the various examples. For example, the described methods may be performed in a different order than described, and steps may be added, omitted, or combined. Furthermore, features described in some examples may be combined in other examples.
[0052] As used herein, the term "comprising" and its variations are open terms meaning "including but not limited to". The term "based on" means "at least partially based on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other definitions, whether explicit or implicit, may be included below. Unless explicitly indicated by the context, the definition of a term shall remain consistent throughout the specification.
[0053] This disclosure proposes a solution for building micro-frontend systems by orchestrating pages from different frontend applications. An orchestration language is defined for grouped pages, which divide the application into logical units for easier management and deployment. By interpreting and parsing the orchestration files, an application grouping model can be generated and compiled into a deployable frontend application, which can then be deployed to a network container.
[0054] First, let's introduce some definitions that will be used in this manual.
[0055] Microservices: A microservices architecture is a method of developing a single application as a set of small services. Each small service runs in its own process and communicates using lightweight mechanisms, typically HTTP resource application programming interfaces (APIs). These services are built around business capabilities through fully automated deployment machines and can be deployed independently.
[0056] Orchestration: Orchestration refers to the automated configuration, coordination, and management of computer systems and software.
[0057] Front-end web deployment: Front-end web development is the process of transforming data into a graphical interface, allowing users to view and interact with the data using digital interactions with HTML, CSS, and JavaScript.
[0058] Micro-frontends: Micro-frontends are an architecture similar to microservices, applying the concept of microservices to the browser side, transforming a web application from a single-purpose application into multiple small frontend applications. Each frontend application can run, develop, and deploy independently.
[0059] In the past, legacy single-page front-end applications written using Backbone.js, Angular.js, Vue.js 1, etc., have been running online and haven't introduced any new features. There's no need to waste time and effort rewriting such applications. Meanwhile, some new front-end applications are built on new frameworks, such as Angular 7, Vue 2, React 12, etc. How to leverage these legacy or new front-end applications to build composite front-end applications is a significant challenge.
[0060] Generally speaking, a typical feature of current front-end applications is that routes are assigned through a framework architecture, and the framework can assign routes to corresponding components. Figure 1 This diagram illustrates the current front-end application page framework 100. The front-end framework defines the page's skeleton. Box 102 contains the page header. Box 104 is the content area, where each root component can be filled, and this content will be visualized as a subpage. Box 106 is the navigation panel, which controls the routing between subpages.
[0061] This disclosure presents a solution for building a micro-frontend architecture by orchestrating a frontend application using subpages from different frontend applications.
[0062] Methods and apparatus for orchestrating front-end applications according to embodiments of the present disclosure will now be described with reference to the accompanying drawings.
[0063] Figure 2 This is a flowchart illustrating an exemplary process of a method 200 for orchestrating a front-end application according to an embodiment of the present disclosure.
[0064] exist Figure 2 First, in box S202, the pre-stored orchestration file is read and parsed to determine all the subpages to be referenced by the front-end application to be orchestrated.
[0065] The orchestration file is pre-written to meet the needs of each front-end application to be orchestrated. It defines the subpages referenced by one or more front-end applications. Furthermore, the orchestration file can define authentication and authorization information, rendering templates, and other details for the front-end applications. For each subpage, the orchestration file also defines its metadata, which may include the subpage name, subpage type, path, configuration parameters, and authentication and authorization information.
[0066] The following is a specific example of a YAML formatted document. Those skilled in the art will understand that the formatting language of the document is not limited to YAML, but may also use other formats, such as JSON, XML, etc.
[0067]
[0068]
[0069] As seen in the code of this orchestration file, multiple front-end applications can be defined in one file. For the front-end application "app1", it includes its description, host, URL, and the definitions of multiple subpages. For the subpage "PageA2", it includes the subpage name, type, route, parameters, authentication information, etc.
[0070] Those skilled in the art will understand how to write an arrangement language as needed, and will not elaborate further here.
[0071] In one example, the initialization operation in S201 can be performed before the operation in box S202 is executed.
[0072] In box S201, the metadata of each subpage of an existing front-end application is extracted by reading and parsing the routes of multiple existing front-end applications, and stored as registration information.
[0073] Those skilled in the art will understand that the initialization operation in block S201 allows the extracted metadata of each existing front-end application's subpage to be stored as registration information. For example, it can be stored in a database, and when orchestrating the front-end application, the metadata of the relevant subpage can be directly queried from the database without having to execute the operation in block S201 each time. The extracted metadata can also be stored in other ways, such as on a storage medium; the method of storing metadata is not limited in the method according to this disclosure.
[0074] For example, the metadata of the subpages defined in the orchestration file can be determined based on the registration information of all stored subpages.
[0075] Next, in box S204, for each subpage, the metadata of that subpage is determined according to the arrangement file.
[0076] Specifically, the name of a subpage and its route can be determined based on the arrangement file.
[0077] Once the name and route of the subpage are determined, the subpage can be used to orchestrate the front-end application.
[0078] In one example, the values of configuration parameters for subpages can also be determined based on the orchestration file, and / or authentication and authorization information can be generated for each subpage.
[0079] After determining the information of each subpage of the front-end application to be orchestrated, the operation in block S106 can be performed to orchestrate the front-end application based on all the determined subpages.
[0080] Figure 3 This is a flowchart illustrating an exemplary process of the operation in block S206. For example... Figure 3 As shown, the operations in block S206 may include the following operations.
[0081] First, in block S2062, the framework of the main page of the front-end application can be generated based on a pre-stored application template or a user-defined application template.
[0082] Application templates may include, for example, HTML DOM (Document Object Model) elements, placeholders, HTML styles, etc.
[0083] Next, in box S2064, all the identified subpages are populated into the content area of the generated frame, and the route of each subpage is added to the frame's navigation panel.
[0084] Then, in block S2068, the compiler corresponding to each subpage is invoked to compile the subpages to generate the front-end application package to be deployed. It can be understood that subpages from different existing applications are compiled using their respective compilers; while for one or more subpages belonging to the same existing application, each subpage can be compiled separately using its corresponding compiler, or all subpages can be compiled together.
[0085] Optionally, before performing the operations in block S2068, the operations in S2066 can also be performed: generating global authentication and authorization information for the orchestrated front-end application.
[0086] In one example, method 200 may also include the operation in S208, which can deploy the generated front-end application package to an application container to obtain a web front-end application; or deploy the front-end application package to a mobile application store to obtain a mobile client front-end application.
[0087] According to the method disclosed herein, a solution is provided for orchestrating front-end applications using subpages from different front-end applications, thereby constructing a micro-front-end architecture. This allows the use of both past front-end applications developed in traditional languages and recent front-end applications developed in newer languages to build a composite front-end application. Front-end applications constructed in this way are easier to manage and deploy, and can save development costs.
[0088] Furthermore, the front-end applications orchestrated according to the methods disclosed herein are platform-independent and can therefore run widely on different types of front-end browsers.
[0089] Figure 4 This is a block diagram illustrating an exemplary configuration of an apparatus 500 for orchestrating front-end applications according to an embodiment of the present disclosure.
[0090] The apparatus 400 for orchestrating front-end applications includes a subpage determination unit 402, a metadata determination unit 404, and an orchestration unit 406.
[0091] The subpage determination unit 402 is configured to read and parse a pre-stored orchestration file to determine all subpages to be referenced by the front-end application to be orchestrated.
[0092] The metadata determination unit 404 is configured to determine the metadata of each subpage based on the orchestration file.
[0093] The orchestration unit 406 is configured to orchestrate the front-end application based on all the identified subpages.
[0094] In one example, the device 400 may also include an initialization unit 401 configured to parse routes of an existing front-end application to extract metadata of each subpage of the existing front-end application and store it as registration information.
[0095] In one example, the orchestration file defines at least one subpage referenced by a front-end application and metadata for each subpage, wherein the metadata for each subpage defined in the orchestration file is determined based on stored registration information.
[0096] In one example, the metadata determination unit 404 is further configured to determine the name of the subpage and the route of the subpage based on the orchestration file.
[0097] In one example, the metadata determination unit 404 is further configured to perform at least one of the following operations:
[0098] The values of the configuration parameters for the subpages are determined based on the arrangement file; and
[0099] Generate authentication and authorization information for subpages.
[0100] In one example, the orchestration unit 406 is further configured as follows:
[0101] Based on a pre-stored application template, the framework of the main page of the front-end application is generated;
[0102] Populate the content area of the frame with all identified subpages, and add the route of each subpage to the navigation panel of the frame; and
[0103] The compiler corresponding to each subpage is invoked to compile the subpage and generate the front-end application package to be deployed.
[0104] In one example, the orchestration unit 406 is further configured as follows:
[0105] Generate global authentication and authorization information for the front-end application.
[0106] In one example, the apparatus 400 for orchestrating a front-end application may further include a deployment unit 408 configured to deploy the front-end application package to an application container or to a mobile application store.
[0107] The details of the operation and function of the various parts of the device 400 for orchestrating the front-end application can be combined with references, for example. Figure 1-3 The relevant parts of the embodiments of the method for orchestrating front-end applications described herein are the same or similar, and will not be described in detail here.
[0108] It should also be noted that, Figure 4 The structure of the apparatus 400 for orchestrating front-end applications and its constituent units shown is merely exemplary; those skilled in the art can modify it as needed. Figure 4 The structural diagram shown is modified.
[0109] Figure 5 A schematic diagram illustrates a specific example of a front-end application orchestration system 500 that orchestrates front-end applications using the method for orchestrating front-end applications according to this disclosure. The following is in conjunction with... Figure 5 This section details the specific operation process of the front-end application orchestration system 500.
[0110] Figure 5 Boxes 501, 502, and 503 in the diagram represent existing, developed front-end applications. Front-end application 501 includes subpages A1, A2...An, etc.; front-end application 502 includes subpages B1, B2...Bn, etc.; and front-end application 503 includes subpages C1, C2...Cn, etc.
[0111] Understandable, although Figure 5 Only three applications are shown here, but in actual use, any number of existing front-end applications can be included, and there is no limit to the number of front-end applications; in addition, the number of subpages included in each front-end application may vary.
[0112] First, the routes 5012, 5022, and 5032 for the existing front-end applications 501, 502, and 503 are parsed to extract the metadata of each subpage of the front-end application. This metadata is then registered in the registry center 504. The registry center 504 can be understood as a database storing the metadata of all subpages as registration information. This registry center 504 can provide an interface for other modules to extract the data from its subpages.
[0113] Next, the orchestrator module 505 reads and parses the orchestration file 506 to determine all the subpages to be referenced by the front-end application to be orchestrated, and obtains the metadata of each subpage from the registry center 504. Specifically, it can determine the subpage name, the subpage route, the values of the subpage configuration parameters, and generate subpage authentication and authorization information, etc.
[0114] Once the metadata for each subpage is determined, these subpages can be used to orchestrate the front-end application you want to orchestrate.
[0115] Specifically, the orchestrator module 505 can obtain templates from the layout module 507, which can define many user-customized user interface templates. These templates have unique names and can be referenced in the orchestration file. Each template can include HTML DOM (Document Object Model) elements, placeholders, HTML styles, etc. The orchestrator module 505 can load the templates and then generate a visual application framework for the main page based on the templates. Then, all the identified subpages can be populated into the content area of the framework, and the routes for each subpage can be added to the framework's navigation panel.
[0116] Next, the generated front-end application can be globally authenticated and certified based on the authentication and authorization information in the Identification and Access Management (IAM) module 508.
[0117] After this, the orchestrator module 605 can call the compilers 5014, 5024 and 5034 of each existing front-end application 501, 502 and 503 to compile the corresponding subpages and generate a deployable front-end application package.
[0118] Finally, the orchestrator module 505 can deploy the front-end application package into the application container 509. Figure 5 The application container 509 shown contains front-end applications 5091, 5092...509m. Taking the orchestrated front-end application 5091 as an example, it can be seen that it includes subpages A2, C3...Bn from different existing front-end applications 501, 503 and 502.
[0119] After deployment, the newly deployed front-end application can be accessed. Different pages of the newly deployed front-end application can communicate with each other via message bus 510 based on an asynchronous event mechanism.
[0120] In addition, the system may include a local memory 511, which can provide a mechanism for sharing data between subpages.
[0121] As per the above reference Figures 1 to 5 Embodiments of a method, apparatus, and system for orchestrating front-end applications according to the present disclosure have been described. The apparatus for orchestrating front-end applications described above can be implemented in hardware, software, or a combination of hardware and software.
[0122] Figure 6 A block diagram of an electronic device 600 implementing an orchestration front-end application according to an embodiment of the present disclosure is shown. According to one embodiment, the electronic device 600 may include at least one processor 602 that executes at least one computer-readable instruction (i.e., the elements implemented in software above) stored or encoded in a computer-readable storage medium (i.e., memory 604).
[0123] In one embodiment, computer-executable instructions are stored in memory 604, which, when executed, cause at least one processor 602 to perform the following actions: read and parse a pre-stored orchestration file to determine all subpages to be referenced by the front-end application to be orchestrated; for each subpage, determine the metadata of that subpage according to the orchestration file; and orchestrate the front-end application based on all the determined subpages.
[0124] It should be understood that the computer-executable instructions stored in memory 604, when executed, cause at least one processor 602 to perform the above-described combinations in the various embodiments of this disclosure. Figure 1-5 The description includes various operations and functions.
[0125] According to one embodiment, a non-transitory machine-readable medium is provided. This non-transitory machine-readable medium may have machine-executable instructions (i.e., the elements implemented in software as described above), which, when executed by a machine, cause the machine to perform the above-described combinations in the various embodiments of this disclosure. Figure 1-5 The description includes various operations and functions.
[0126] According to one embodiment, a computer program is provided, including computer-executable instructions that, when executed, cause at least one processor to perform the above-described embodiments of the present disclosure. Figure 1-5 The description includes various operations and functions.
[0127] According to one embodiment, a computer program product is provided, including computer-executable instructions that, when executed, cause at least one processor to perform the above-described embodiments of the present disclosure. Figure 1-5 The description includes various operations and functions.
[0128] The specific embodiments described above with reference to the accompanying drawings are exemplary embodiments, but do not represent all embodiments that can be implemented or fall within the scope of the claims. The term "exemplary" as used throughout this specification means "serving as an example, instance, or illustration" and does not imply that it is "preferred" or "advantageous" compared to other embodiments. Specific details are included to provide an understanding of the described techniques. However, these techniques can be practiced without these specific details. In some instances, well-known structures and apparatuses are shown in block diagram form to avoid obscuring the concepts of the described embodiments.
[0129] The foregoing description of this disclosure is provided to enable any person skilled in the art to implement or use this disclosure. Various modifications to this disclosure will be apparent to those skilled in the art, and the general principles defined herein can be applied to other variations without departing from the scope of this disclosure. Therefore, this disclosure is not limited to the examples and designs described herein, but is consistent with the widest scope of the principles and novel features disclosed herein.
Claims
1. Methods for orchestrating front-end applications, including: Read and parse the pre-stored orchestration file to determine all the subpages that the front-end application to be orchestrated will reference; For each subpage, the metadata of the subpage is determined according to the orchestration file, and the metadata of the subpage includes the subpage's route; as well as The front-end application is orchestrated based on all the identified subpages; The front-end application is orchestrated based on all identified subpages, including: The framework of the main page of the front-end application is generated based on a pre-stored application template or a user-defined application template. Populate the content area of the frame with all identified subpages, and add the route of each subpage to the navigation panel of the frame; and The compiler corresponding to each subpage is invoked to compile the subpage to generate a front-end application package to be deployed. For subpages from different existing front-end applications, their corresponding different compilers are used for compilation. All the subpages include legacy subpages written using Backbone.js, Angular.js, or Vue.js1, as well as new subpages written using Angular 7, Vue 2, or React 12; The method further includes the following steps before reading and parsing the pre-stored arrangement file: The routes of existing front-end applications are parsed to extract the metadata of each subpage of the existing front-end application, and stored as registration information.
2. The method as described in claim 1, wherein, The orchestration file defines at least one subpage to be referenced by the front-end application and the metadata of each subpage, wherein the metadata of each subpage defined in the orchestration file is determined based on the stored registration information.
3. The method as described in claim 1, wherein, Determining the metadata of the subpage based on the orchestration file also includes at least one of the following operations: The values of the configuration parameters for the subpages are determined based on the arrangement file; and Generate authentication and authorization information for subpages.
4. The method of claim 1, wherein, Before generating the front-end application package to be deployed, orchestrating the front-end application based on all identified subpages also includes: Generate global authentication and authorization information for the front-end application.
5. The method of claim 1, further comprising: Deploy the front-end application package to be deployed into an application container or into a mobile application store.
6. A device (400) for orchestrating front-end applications, comprising: A subpage determination unit (402) is configured to read and parse a pre-stored orchestration file to determine all subpages to be referenced by the front-end application to be orchestrated; A metadata determination unit (404) is configured to determine, for each subpage, the metadata of that subpage based on the orchestration file, the metadata of the subpage including the subpage's routing; and An orchestration unit (406) is configured to orchestrate the front-end application based on all determined subpages; The arrangement unit (406) is further configured as follows: The framework of the main page of the front-end application is generated based on a pre-stored application template or a user-defined application template. Fill the content area of the frame with all the identified subpages, and add the route of each subpage to the navigation panel of the frame; as well as The compiler corresponding to each subpage is invoked to compile the subpage to generate a front-end application package to be deployed. For subpages from different existing front-end applications, their corresponding different compilers are used for compilation. All the subpages include legacy subpages written using Backbone.js, Angular.js, or Vue.js1, as well as new subpages written using Angular 7, Vue 2, or React 12; Also includes: An initialization unit (401) is configured to parse routes of existing front-end applications to extract metadata of each subpage of the existing front-end application and store it as registration information.
7. The apparatus (400) as claimed in claim 6, wherein, The orchestration file defines at least one subpage to be referenced by the front-end application and the metadata of each subpage, wherein the metadata of each subpage defined in the orchestration file is determined based on the stored registration information.
8. The apparatus (400) as claimed in claim 6, wherein, The metadata determination unit (404) is further configured to perform at least one of the following operations: The values of the configuration parameters for the subpages are determined based on the arrangement file; and Generate authentication and authorization information for subpages.
9. The apparatus (400) as claimed in claim 6, wherein, The arrangement unit (406) is further configured as follows: Generate global authentication and authorization information for the front-end application.
10. The apparatus of claim 9, further comprising: A deployment unit (408) is configured to deploy the front-end application package to be deployed into an application container or to a mobile application store.
11. Electronic equipment (600), including: At least one processor (602); as well as A memory (604) coupled to the at least one processor (602), the memory being used to store instructions that, when executed by the at least one processor (602), cause the processor (602) to perform the method as described in any one of claims 1 to 5.
12. A non-transitory machine-readable storage medium storing executable instructions that, when executed, cause the machine to perform the method as described in any one of claims 1 to 5.
13. A computer program product tangibly stored on a computer-readable medium and comprising computer-executable instructions that, when executed, cause at least one processor to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Front-end development method and device based on modularization, equipment and storage medium
CN109901838A