CN115994002A - Software application running method, computer equipment and computer storage medium - Google Patents

Software application running method, computer equipment and computer storage medium Download PDF

Info

Publication number
CN115994002A
CN115994002A CN202310083211.5A CN202310083211A CN115994002A CN 115994002 A CN115994002 A CN 115994002A CN 202310083211 A CN202310083211 A CN 202310083211A CN 115994002 A CN115994002 A CN 115994002A
Authority
CN
China
Prior art keywords
application
sub
client
resources
target sub
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
CN202310083211.5A
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.)
Shenzhen Landray Software Co ltd
Original Assignee
Shenzhen Landray Software 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 Shenzhen Landray Software Co ltd filed Critical Shenzhen Landray Software Co ltd
Priority to CN202310083211.5A priority Critical patent/CN115994002A/en
Publication of CN115994002A publication Critical patent/CN115994002A/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

Abstract

The embodiment of the application discloses a software application running method, computer equipment and a computer storage medium, which are used for improving the loading running efficiency of sub-applications of a software application and facilitating the development and management of the software application. The embodiment of the application comprises the following steps: the server side can determine the target sub-application of the software application to be accessed by the client side according to the access route of the client side to the software application, so that sub-application resources of the target sub-application are sent to the client side, the client side can render a front-end page of the target sub-application according to the sub-application resources of the target sub-application, namely, the client side only needs to load and run the sub-application which the client side needs to access, and does not need to load and run all the sub-applications deployed by the server side, so that the burden of the client side is greatly reduced, the loading and running of the sub-application are simpler, more convenient and feasible, and the loading and running efficiency of the sub-application is improved.

Description

Software application running method, computer equipment and computer storage medium
Technical Field
The embodiment of the application relates to the field of software development, in particular to a software application running method, computer equipment and a computer storage medium.
Background
The application of the micro front-end architecture enables the large software application to be split into a plurality of sub-applications which are not possibly all on the same server, but the micro front-end architecture can ensure that the sub-applications can be normally accessed in the same software application, and the sub-applications can be independently operated, deployed and tested, so that the development and management of the software application can be facilitated.
At present, the application of the micro front end architecture has a set of standard processes, namely, application registration, application loading and application running. Registering an application refers to registering a plurality of sub-applications on a server; the application loading means that the server sends the sub-application resources of the plurality of sub-applications to the client, and the client loads the sub-application resources of the plurality of sub-applications; running the application means that the client renders each page of the plurality of sub-applications according to the sub-application resources of the plurality of sub-applications.
However, when there are multiple sub-applications, the client needs to load and run the multiple sub-applications, the process is very tedious, and a huge burden is also imposed on the client.
Disclosure of Invention
The embodiment of the application provides a software application running method, computer equipment and a computer storage medium, which are used for improving the loading running efficiency of sub-applications of a software application and facilitating the development and management of the software application.
The first aspect of the embodiment of the application provides a software application running method, which is applied to a server of a software application, wherein the server is in communication connection with a client; the software application deploys a plurality of sub-applications based on a micro front-end architecture, the method comprising:
deploying sub-application resources of the plurality of sub-applications, wherein the sub-application resources are used for rendering front-end pages of the sub-applications;
acquiring an access route of the client to the software application;
determining a target sub-application of the client to access the software application according to the access route;
and sending the sub-application resources of the target sub-application to the client so that the client renders the front-end page of the target sub-application according to the sub-application resources of the target sub-application.
A second aspect of the embodiments of the present application provides a software application running method, where the method is applied to a client of a software application, and the client is communicatively connected to a server; the software application deploys a plurality of sub-applications based on a micro front-end architecture, and the server deploys sub-application resources of the plurality of sub-applications, wherein the sub-application resources are used for rendering front-end pages of the sub-applications; the method comprises the following steps:
sending a sub-application access request to the server, wherein the sub-application access request carries an access route for the software application;
receiving sub-application resources of a target sub-application which are returned by the server according to the access route to determine the target sub-application accessed by the client;
and rendering a front-end page of the target sub-application according to the sub-application resources of the target sub-application.
A third aspect of the embodiments of the present application provides a computer device, where the computer device is applied to a server of a software application, and the server is communicatively connected to a client; the software application deploys a plurality of sub-applications based on a micro front-end architecture, the computer device comprising:
the deployment unit is used for deploying sub-application resources of the plurality of sub-applications, wherein the sub-application resources are used for rendering front-end pages of the sub-applications;
the acquisition unit is used for acquiring the access route of the client to the software application;
a determining unit, configured to determine, according to the access route, a target sub-application that the client accesses the software application;
and the sending unit is used for sending the sub-application resources of the target sub-application to the client so that the client renders the front-end page of the target sub-application according to the sub-application resources of the target sub-application.
A fourth aspect of the embodiments of the present application provides a computer device, where the computer device is applied to a client of a software application, and the client is communicatively connected to a server; the software application deploys a plurality of sub-applications based on a micro front-end architecture, and the server deploys sub-application resources of the plurality of sub-applications, wherein the sub-application resources are used for rendering front-end pages of the sub-applications; the computer device includes:
a sending unit, configured to send a sub-application access request to the server, where the sub-application access request carries an access route for the software application;
the receiving unit is used for receiving sub-application resources of the target sub-application returned by the server according to the target sub-application accessed by the client determined by the access route;
and the rendering unit is used for rendering the front-end page of the target sub-application according to the sub-application resources of the target sub-application.
A fifth aspect of the embodiments of the present application provides a computer device comprising a memory storing a computer program and a processor implementing the method of the first or second aspect when the processor executes the computer program.
A sixth aspect of the embodiments of the present application provides a computer storage medium having stored therein instructions which, when executed on a computer, cause the computer to perform the method of the foregoing first or second aspect.
From the above technical solutions, the embodiments of the present application have the following advantages:
the server side can determine the target sub-application of the software application to be accessed by the client side according to the access route of the client side to the software application, so that sub-application resources of the target sub-application are sent to the client side, the client side can render a front-end page of the target sub-application according to the sub-application resources of the target sub-application, namely, the client side only needs to load and run the sub-application which the client side needs to access, and does not need to load and run all the sub-applications deployed by the server side, so that the burden of the client side is greatly reduced, the loading and running of the sub-application are simpler, more convenient and feasible, and the loading and running efficiency of the sub-application is improved.
Drawings
FIG. 1 is a schematic flow chart of a software application running method in an embodiment of the present application;
FIG. 2 is a schematic flow chart of another method for running a software application according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a computer device according to an embodiment of the present application;
FIG. 4 is a schematic diagram of another configuration of a computer device according to an embodiment of the present application;
fig. 5 is a schematic diagram of another structure of a computer device in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a software application running method, computer equipment and a computer storage medium, which are used for improving the loading running efficiency of sub-applications of a software application and facilitating the development and management of the software application.
The following describes a software application running method in an embodiment of the present application:
referring to fig. 1, an embodiment of a software application running method in an embodiment of the present application includes:
101. deploying sub-application resources of the plurality of sub-applications, wherein the sub-application resources are used for rendering front-end pages of the sub-applications;
the method of the embodiment can be applied to a server of a software application, and the server can be deployed on a server and is in communication connection with a client. The software application deploys multiple sub-applications based on the micro front-end architecture, which may be deployed on the same server or on different servers.
The server may deploy sub-application resources of a plurality of sub-applications of the software application, the sub-application resources being used to render front-end pages of the sub-applications.
102. Acquiring an access route of the client to the software application;
the client may send an access request to the server for the sub-application, the access request carrying an access route for the software application by the client. The access route represents address information of an object to be accessed by the client, so that it can be determined which sub-application of the software application the client needs to access according to the access route.
103. Determining a target sub-application of the client to access the software application according to the access route;
when the access route is acquired, the target sub-application to be accessed by the client can be determined according to the access route because the access route represents the address information of the object to be accessed by the client.
104. Transmitting the sub-application resources of the target sub-application to the client so that the client renders a front-end page of the target sub-application according to the sub-application resources of the target sub-application;
after determining that the client needs to access a target sub-application in a plurality of sub-applications of the software application, sub-application resources of the target sub-application can be acquired, and sub-application resources of the target sub-application are sent to the client, so that the client renders a front-end page of the target sub-application according to the sub-application resources of the target sub-application, and displays the front-end page to realize interaction with a user.
Therefore, in this embodiment, the server may determine, according to the access route of the client to the software application, that the client needs to access the target sub-application of the software application, so as to send the sub-application resource of the target sub-application to the client, and the client may render the front page of the target sub-application according to the sub-application resource of the target sub-application, that is, the client only needs to load and run the sub-application that the client needs to access, and does not need to load and run all the sub-applications deployed by the server, thereby greatly reducing the burden of the client, and making the loading and running of the sub-application simpler and easier, and improving the loading and running efficiency of the sub-application.
In this embodiment, the server deployed by the server may be any application server, for example, may be an nginnx server, a Web server, or the like. The client may be any form of client, such as a browser client, a mobile client, an applet client, and the like. The micro front-end architecture can be developed and deployed based on the compact framework technology, and the software application can be developed and deployed based on the micro front-end architecture, so that the software application can be split into a plurality of sub-applications, the micro front-end architecture can ensure that the plurality of sub-applications can be normally accessed in the same software application, and each sub-application can be independently operated, deployed and tested, thereby greatly facilitating the development and management of the software application.
Specifically, the software development platform can recommend project developers according to project basic information input by project sponsors in the platform, and groups excellent personnel in different fields such as business, development, test and the like inside and outside the platform, and members of the group execute various works such as development, deployment, test and the like of software applications. Then, the application code file of the software application is generated through automation tools such as node. Js, webpack, babel, typescript and the like, the application function of the software application can be independently developed locally by running the application code file, the application code file can be submitted to a code management warehouse of the application after development is completed, and the application code file is issued to a corresponding server by an operation and maintenance personnel to complete the deployment of a plurality of sub-applications of the software application.
In a preferred implementation manner of this embodiment, the types of the clients include a management end and a user end, where the management end is configured to provide adjustment and layout of front-end pages for an administrator, that is, the administrator may adjust and layout front-end pages of sub-applications on front-end pages of the management end; the user side is used for providing the display and interaction of the front-end page for the user, namely the user can browse information such as characters, pictures, videos and the like on the front-end page of the user side or input a user instruction to instruct the client side to execute corresponding processing operation. The type of the client may be determined according to a client identifier carried by an access route of the client to the software application, i.e. the client identifier may indicate that the client is a management end or that the client is a user end.
Accordingly, each sub-application has a management terminal application resource applied to the management side and a user terminal application resource applied to the user side. Therefore, the server side can determine the type of the client side according to the client side identification carried by the access route of the client side to the software application. If the client is a management end, sending management terminal application resources of the target sub-application to the client, and rendering a front-end page of the management end by the client according to the management terminal application resources; if the client is a user terminal, the user terminal application resource of the target sub-application is sent to the client, and the client renders a front page of the user terminal according to the user terminal application resource.
Therefore, according to the type of the client, corresponding sub-application resources are loaded and operated, different requirements on software functions under different use scenes of the software application can be met, and the use experience of a user on the software application is improved.
In another preferred implementation manner of this embodiment, the server may manage the routing information of the sub-application, that is, obtain the routing information of the plurality of sub-applications of the software application, and register the routing information of the plurality of sub-applications into the global routing information of the software application, so as to manage and maintain the plurality of routing information of the software application. Wherein the routing information indicates address information of the sub-application or indicates an access path of the sub-application. Therefore, when the access route of the client to the software application is obtained, the server can determine the target route information corresponding to the access route in the global route information and determine the target sub-application corresponding to the target route information, so that the sub-application required to be accessed by the client can be determined.
In this embodiment, the sub-application resources of the sub-application may include a summary file, external service information, an entry file, a picture resource, a video resource, and the like of the sub-application. After the sub-application resources are analyzed and processed, files such as CSS files, javascript scripts and the like of the sub-application can be obtained, and a renderer of the client can render the files to obtain front-end pages of the sub-application. Among them, CSS files (cascading style sheets) are computer language files for representing file styles of HTML or XML, etc. The CSS not only can statically modify the web page, but also can dynamically format each element of the web page in cooperation with various scripting languages. The CSS file can accurately control the typesetting of element positions in the webpage at a pixel level, supports almost all font size styles and has the capability of editing webpage objects and model styles. Therefore, the renderer of the client can render the front-end page of the sub-application according to the CSS file, the Javascript script and other files.
The software application running method executed by the server in the embodiment of the present application is described above, and the software application running method executed by the client in the embodiment of the present application will be further described below. Referring specifically to fig. 2, embodiments of the present application will be described in further detail below based on the embodiment shown in fig. 1. Another embodiment of the software application running method in the embodiment of the present application includes:
201. sending a sub-application access request to the server, wherein the sub-application access request carries an access route for the software application;
the method of the embodiment can be applied to a client of a software application, and the client can be deployed in terminal equipment such as a computer, a mobile phone, a tablet personal computer and the like and is in communication connection with a server. The software application deploys multiple sub-applications based on the micro front-end architecture, which may be deployed on the same server or on different servers.
The server may deploy sub-application resources of a plurality of sub-applications of the software application, the sub-application resources being used to render front-end pages of the sub-applications.
When a user needs to access a certain sub-application in the software application, the client can be used to send a sub-application access request to the server, wherein the sub-application access request carries an access route to the software application. The access route represents address information of an object to be accessed by the client, so that it can be determined which sub-application of the software application the client needs to access according to the access route.
202. Receiving sub-application resources of a target sub-application which are returned by the server according to the access route to determine the target sub-application accessed by the client;
when the server acquires the access route, the access route represents the address information of the object to be accessed by the client, so that the target sub-application to be accessed by the client can be determined according to the access route. After determining that the client needs to access a target sub-application in a plurality of sub-applications of the software application, the server side can acquire sub-application resources of the target sub-application and send the sub-application resources of the target sub-application to the client side, and then the client side receives the sub-application resources of the target sub-application returned by the client side according to the access route determination target sub-application accessed by the client side.
203. Rendering a front-end page of the target sub-application according to the sub-application resources of the target sub-application;
after obtaining the sub-application resources of the target sub-application, the client may render a front-end page of the target sub-application according to the sub-application resources of the target sub-application, and may display the front-end page to implement interaction with the user.
Therefore, in this embodiment, the server may determine, according to the access route of the client to the software application, that the client needs to access the target sub-application of the software application, so as to send the sub-application resource of the target sub-application to the client, and the client may render the front page of the target sub-application according to the sub-application resource of the target sub-application, that is, the client only needs to load and run the sub-application that the client needs to access, and does not need to load and run all the sub-applications deployed by the server, thereby greatly reducing the burden of the client, and making the loading and running of the sub-application simpler and easier, and improving the loading and running efficiency of the sub-application.
In a preferred implementation manner of this embodiment, the access route of the client to the software application carries a client identifier for indicating a type of the client, where the type of the client includes a management end and a user end, that is, the client identifier may indicate that the client is a management end or indicates that the client is a user end. The management end is used for providing the adjustment and layout of the front-end page for the manager, namely the manager can adjust and layout the front-end page of the sub-application on the front-end page of the management end; the user side is used for providing the display and interaction of the front-end page for the user, namely the user can browse information such as characters, pictures, videos and the like on the front-end page of the user side or input a user instruction to instruct the client side to execute corresponding processing operation.
Therefore, when the server determines that the client is the management end according to the client identifier, the server acquires the management terminal application resource of the target sub-application and sends the management terminal application resource of the target sub-application to the client, and the client renders a front page of the management end according to the management terminal application resource of the target sub-application. When the server determines that the client is a user terminal according to the client identification, the server acquires user terminal application resources of the target sub-application and sends the user terminal application resources of the target sub-application to the client, and the client renders a front page of the user terminal according to the user terminal application resources of the target sub-application.
Therefore, according to the type of the client, corresponding sub-application resources are loaded and operated, different requirements on software functions under different use scenes of the software application can be met, and the use experience of a user on the software application is improved.
In another preferred implementation manner of this embodiment, the client is configured with a storage module, where the storage module is configured to store the sub-application resources of the accessed sub-application. Therefore, when the sub-application of the software application needs to be accessed, whether a history access record exists in the target sub-application to be accessed or not can be judged in advance, namely whether the target sub-application to be accessed has been accessed before is judged, if yes, sub-application resources of the target sub-application are obtained from the storage module, and a front-end page of the target sub-application is rendered according to the sub-application resources of the target sub-application; if not, step 201 is executed, and after obtaining the sub-application resources of the target sub-application, the sub-application resources of the target sub-application are stored in the storage module, so that the sub-application resources of the target sub-application can be directly obtained from the storage module when the target sub-application is accessed next time.
The storage module may be a cache module, such as a JVM cache, a file cache, a dis cache, or other storage modules, for example, a persistent storage module.
Therefore, the sub-application resources of the accessed sub-application are stored, and after that, the sub-application resources are directly obtained from the storage module when the sub-application is accessed again, so that the obtaining speed of the sub-application resources can be improved, the rendering speed of the front-end page of the sub-application can be further improved, the generation of the front-end page can be accelerated, and the user experience can be improved.
In this embodiment, the sub-application resources of the sub-application may include a summary file, external service information, an entry file, a picture resource, a video resource, and the like of the sub-application. After analyzing and processing the sub-application resources, the renderer of the client can acquire files such as CSS files and Javascript scripts of the sub-application, and the renderer of the client can further render the front-end pages of the sub-application according to the CSS files and the files such as the Javascript scripts.
Therefore, in the embodiment of the application, besides improving the traditional software application development mode to improve the development efficiency of the software application, developers can be helped to quickly develop the software application through independent operation, independent management and other modes, the micro front end architecture provides rich tools to help quickly build the software application, and then helps the developers to perform code work on the basis application, and meanwhile, the open ecologization system can also help the developers to increase the income and the platform awareness of the business.
Secondly, the method provided by the embodiment of the application can help developers in the whole application development process such as the requirement, test and other stages, and is not limited to the code development stage. The iterative mechanism of the dynamic micro front-end architecture gives the software development platform the capability of building large-scale complex applications, improves the development efficiency compared with the traditional code mode, and meanwhile, the application running mechanism with strong architecture ensures that the software applications can be conveniently integrated into large applications even if the content is more and the functions are more complex, thereby greatly reducing the development cost and the management cost of the software applications.
The software application running method in the embodiment of the application is described above, and the computer equipment in the embodiment of the application is described below, wherein the computer equipment is applied to a server side of the software application, and the server side is in communication connection with a client side; the software application deploys a plurality of sub-applications based on a micro front-end architecture. Referring to fig. 3, in an embodiment of the present application, a computer device includes:
a deployment unit 301, configured to deploy sub-application resources of the plurality of sub-applications, where the sub-application resources are used to render front-end pages of the sub-applications;
an obtaining unit 302, configured to obtain an access route of the client to the software application;
a determining unit 303, configured to determine, according to the access route, a target sub-application that the client accesses the software application;
and the sending unit 304 is configured to send the sub-application resource of the target sub-application to the client, so that the client renders the front-end page of the target sub-application according to the sub-application resource of the target sub-application.
In a preferred implementation manner of this embodiment, the types of the clients include a management end and a user end, where the management end is configured to provide adjustment and layout of a front end page for an administrator, and the user end is configured to provide presentation and interaction of the front end page for a user;
the target sub-application comprises a management terminal application resource applied to a management terminal and a user terminal application resource applied to a user terminal;
the sending unit 304 is specifically configured to determine a type of the client according to a client identifier carried by the access route; if the client is a management end, sending management terminal application resources of the target sub-application to the client so that the client renders a front-end page of the management end according to the management terminal application resources; and if the client is a user terminal, sending the user terminal application resource of the target sub-application to the client so that the client renders a front-end page of the user terminal according to the user terminal application resource.
In a preferred implementation of this embodiment, the computer device further includes:
a registration unit 305, configured to obtain routing information of the plurality of sub-applications, and register the routing information of the plurality of sub-applications into global routing information of the software application;
the determining unit 303 is specifically configured to determine target routing information corresponding to the access route in the global routing information; and determining the target sub-application corresponding to the target routing information.
In this embodiment, the operations performed by the units in the computer device are similar to those described in the embodiment shown in fig. 1, and are not repeated here.
In this embodiment, the server may determine, according to the access route of the client to the software application, that the client needs to access the target sub-application of the software application, so as to send the sub-application resource of the target sub-application to the client, and the client may render the front page of the target sub-application according to the sub-application resource of the target sub-application, that is, the client only needs to load and run the sub-application that the client needs to access, and does not need to load and run all the sub-applications deployed by the server, thereby greatly reducing the burden of the client, and making the loading and running of the sub-application simpler, more convenient and easier, and improving the loading and running efficiency of the sub-application.
Another embodiment of a computer device in an embodiment of the present application is described below, where the computer device is applied to a client of a software application, where the client is communicatively connected to a server; the software application deploys a plurality of sub-applications based on a micro front-end architecture, and the server deploys sub-application resources of the plurality of sub-applications, wherein the sub-application resources are used for rendering front-end pages of the sub-applications. Referring to fig. 4, in an embodiment of the present application, a computer device includes:
a sending unit 401, configured to send a sub-application access request to the server, where the sub-application access request carries an access route for the software application;
a receiving unit 402, configured to receive a sub-application resource of a target sub-application returned by the server according to the access route to determine the target sub-application accessed by the client;
and the rendering unit 403 is configured to render a front-end page of the target sub-application according to the sub-application resource of the target sub-application.
In a preferred implementation manner of this embodiment, the access route carries a client identifier for indicating a type of the client, where the type of the client includes a management end and a user end, the management end is configured to provide adjustment and layout of a front end page for an administrator, and the user end is configured to provide presentation and interaction of the front end page for a user;
the receiving unit 402 is specifically configured to:
rendering a front-end page of a management end according to management terminal application resources of the target sub-application, wherein the management terminal application resources are sent to the client by the server when the client is determined to be the management end according to the client identifier;
or alternatively, the process may be performed,
and rendering a front-end page of the user according to the user terminal application resource of the target sub-application, wherein the user terminal application resource is sent to the client by the server when the client is determined to be the user according to the client identifier.
In a preferred implementation manner of this embodiment, the client is configured with a storage module, where the storage module is configured to store sub-application resources of the accessed sub-application;
the computer device further comprises:
a judging unit 404, configured to judge whether a history access record exists in the target sub-application to be accessed;
an obtaining unit 405, configured to obtain, from the storage module, a sub-application resource of the target sub-application when the target sub-application to be accessed has a history access record, and the rendering unit 403 is further configured to render a front-end page of the target sub-application according to the sub-application resource of the target sub-application;
the sending unit 401 is further configured to perform the step of sending a sub-application access request to the server when the target sub-application to be accessed does not have a history access record;
and the storage unit 406 is configured to store the sub-application resource of the target sub-application to the storage module after obtaining the sub-application resource of the target sub-application.
In this embodiment, the operations performed by the units in the computer device are similar to those described in the embodiment shown in fig. 2, and will not be described here again.
In this embodiment, the server may determine, according to the access route of the client to the software application, that the client needs to access the target sub-application of the software application, so as to send the sub-application resource of the target sub-application to the client, and the client may render the front page of the target sub-application according to the sub-application resource of the target sub-application, that is, the client only needs to load and run the sub-application that the client needs to access, and does not need to load and run all the sub-applications deployed by the server, thereby greatly reducing the burden of the client, and making the loading and running of the sub-application simpler, more convenient and easier, and improving the loading and running efficiency of the sub-application.
Referring to fig. 5, an embodiment of a computer device in the embodiment of the present application includes:
the computer device 500 may include one or more central processing units (central processingunits, CPU) 501 and a memory 505, where the memory 505 stores one or more application programs or data.
Wherein the memory 505 may be volatile storage or persistent storage. The program stored in the memory 505 may include one or more modules, each of which may include a series of instruction operations on a computer device. Still further, the central processor 501 may be configured to communicate with the memory 505 and execute a series of instruction operations in the memory 505 on the computer device 500.
The computer device 500 may also include one or more power supplies 502, one or more wired or wireless network interfaces 503, one or more input/output interfaces 504, and/or one or more operating systems, such as WindowsServerTM, macOSXTM, unixTM, linuxTM, freeBSDTM, etc.
The cpu 501 may perform the operations performed by the server or the client in the embodiments shown in fig. 1 to 2, which are not described herein.
Embodiments of the present application also provide a computer storage medium, where one embodiment includes: the computer storage medium has stored therein instructions that, when executed on a computer, cause the computer to perform the operations performed by the server or the operations performed by the client in the embodiments shown in fig. 1 to 2.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (12)

1. The method is applied to a server of the software application, and the server is in communication connection with a client; the software application deploys a plurality of sub-applications based on a micro front-end architecture, the method comprising:
deploying sub-application resources of the plurality of sub-applications, wherein the sub-application resources are used for rendering front-end pages of the sub-applications;
acquiring an access route of the client to the software application;
determining a target sub-application of the client to access the software application according to the access route;
and sending the sub-application resources of the target sub-application to the client so that the client renders the front-end page of the target sub-application according to the sub-application resources of the target sub-application.
2. The method according to claim 1, wherein the types of the clients include a management end and a user end, the management end is used for providing adjustment and layout of front end pages for an administrator, and the user end is used for providing presentation and interaction of front end pages for a user;
the target sub-application comprises a management terminal application resource applied to a management terminal and a user terminal application resource applied to a user terminal;
the sending the sub-application resource of the target sub-application to the client includes:
determining the type of the client according to the client identifier carried by the access route;
if the client is a management end, sending management terminal application resources of the target sub-application to the client so that the client renders a front-end page of the management end according to the management terminal application resources;
and if the client is a user terminal, sending the user terminal application resource of the target sub-application to the client so that the client renders a front-end page of the user terminal according to the user terminal application resource.
3. The method according to claim 1, wherein the method further comprises:
acquiring the route information of the plurality of sub-applications, and registering the route information of the plurality of sub-applications into the global route information of the software application;
the determining, according to the access route, a target sub-application of the client to access the software application, including:
determining target route information corresponding to the access route in the global route information;
and determining the target sub-application corresponding to the target routing information.
4. A method according to any one of claims 1 to 3, wherein the sub-application resources comprise summary files, external service information, and portal files, picture resources, video resources of the sub-application.
5. A software application running method, which is characterized in that the method is applied to a client of a software application, and the client is in communication connection with a server; the software application deploys a plurality of sub-applications based on a micro front-end architecture, and the server deploys sub-application resources of the plurality of sub-applications, wherein the sub-application resources are used for rendering front-end pages of the sub-applications; the method comprises the following steps:
sending a sub-application access request to the server, wherein the sub-application access request carries an access route for the software application;
receiving sub-application resources of a target sub-application which are returned by the server according to the access route to determine the target sub-application accessed by the client;
and rendering a front-end page of the target sub-application according to the sub-application resources of the target sub-application.
6. The method of claim 5, wherein the access route carries a client identifier for indicating a type of the client, the type of the client including a management end for providing an administrator with adjustment and layout of a front page, and a user end for providing a user with presentation and interaction of the front page;
the rendering the front-end page of the target sub-application according to the sub-application resource of the target sub-application includes:
rendering a front-end page of a management end according to management terminal application resources of the target sub-application, wherein the management terminal application resources are sent to the client by the server when the client is determined to be the management end according to the client identifier;
or alternatively, the process may be performed,
and rendering a front-end page of the user according to the user terminal application resource of the target sub-application, wherein the user terminal application resource is sent to the client by the server when the client is determined to be the user according to the client identifier.
7. The method of claim 5, wherein the client is configured with a storage module for storing sub-application resources of the accessed sub-application;
the method further comprises the steps of:
judging whether the target sub-application to be accessed has a history access record or not;
if yes, sub-application resources of the target sub-application are obtained from the storage module, and a front-end page of the target sub-application is rendered according to the sub-application resources of the target sub-application;
if not, executing the step of sending the sub-application access request to the server, and storing the sub-application resources of the target sub-application to the storage module after obtaining the sub-application resources of the target sub-application.
8. The method according to any one of claims 5 to 7, wherein the sub-application resources include summary files, external service information, and portal files, picture resources, video resources of the sub-application.
9. A computer device, wherein the computer device is applied to a server of a software application, and the server is in communication connection with a client; the software application deploys a plurality of sub-applications based on a micro front-end architecture, the computer device comprising:
the deployment unit is used for deploying sub-application resources of the plurality of sub-applications, wherein the sub-application resources are used for rendering front-end pages of the sub-applications;
the acquisition unit is used for acquiring the access route of the client to the software application;
a determining unit, configured to determine, according to the access route, a target sub-application that the client accesses the software application;
and the sending unit is used for sending the sub-application resources of the target sub-application to the client so that the client renders the front-end page of the target sub-application according to the sub-application resources of the target sub-application.
10. A computer device, wherein the computer device is applied to a client of a software application, and the client is in communication connection with a server; the software application deploys a plurality of sub-applications based on a micro front-end architecture, and the server deploys sub-application resources of the plurality of sub-applications, wherein the sub-application resources are used for rendering front-end pages of the sub-applications; the computer device includes:
a sending unit, configured to send a sub-application access request to the server, where the sub-application access request carries an access route for the software application;
the receiving unit is used for receiving sub-application resources of the target sub-application returned by the server according to the target sub-application accessed by the client determined by the access route;
and the rendering unit is used for rendering the front-end page of the target sub-application according to the sub-application resources of the target sub-application.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the method of any of claims 1 to 8 when executing the computer program.
12. A computer storage medium having instructions stored therein, which when executed on a computer, cause the computer to perform the method of any of claims 1 to 8.
CN202310083211.5A 2023-01-13 2023-01-13 Software application running method, computer equipment and computer storage medium Pending CN115994002A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310083211.5A CN115994002A (en) 2023-01-13 2023-01-13 Software application running method, computer equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310083211.5A CN115994002A (en) 2023-01-13 2023-01-13 Software application running method, computer equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN115994002A true CN115994002A (en) 2023-04-21

Family

ID=85991835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310083211.5A Pending CN115994002A (en) 2023-01-13 2023-01-13 Software application running method, computer equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN115994002A (en)

Similar Documents

Publication Publication Date Title
US11144711B2 (en) Webpage rendering method, device, electronic apparatus and storage medium
CN107066631A (en) Display methods, device and the electronic equipment of the page
CN109542427B (en) System customization method and device, electronic equipment and storage medium
CN108399088B (en) Page display method, user terminal, page server and style configuration server
CN111680253B (en) Page application data packet generation method and device, computer equipment and storage medium
US8682964B1 (en) Progressively loading network content
KR20130066603A (en) Initiating font subsets
CN113419729B (en) Front-end page building method, device, equipment and storage medium based on componentization
CN111475161A (en) Method, device and equipment for accessing component
US20230418835A1 (en) Systems and methods for presenting web application content
CN110826002A (en) Information sharing method and device, terminal and storage medium
CN113382083A (en) Webpage screenshot method and device
CN111290996A (en) Document format conversion method, device, equipment and readable storage medium
CN110968314A (en) Page generation method and device
CN111431767A (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
CN105260459A (en) Search method and apparatus
CN112052000A (en) Component multiplexing and rendering method and device
CN112632425A (en) Method, device, equipment and storage medium for generating offline resource file
CN107506597A (en) Medical files acquisition methods, terminal and server
CN115994002A (en) Software application running method, computer equipment and computer storage medium
CN114048048A (en) Information sharing method and device, electronic equipment and storage medium
CN113760253A (en) Front-end rendering method, apparatus, device, medium, and program product
CN113656041A (en) Data processing method, device, equipment and storage medium
CN107045549B (en) Method and device for acquiring page number of electronic book
CN113961279A (en) Page rendering method, device, server 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