Web application plug-in development method, device, electronic device, medium and program

By obtaining and sending plug-in scripts on the development terminal to the server to generate plug-in page files, the problem of code theft and version mismatch caused by local SDK installation is solved, and safe and version-matching Web application plug-in development is realized.

CN114115813BActive Publication Date: 2024-09-20QI AN XIN TECHNOLOGY GROUP INC +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010797359.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-10
Publication Date
2024-09-20
Estimated Expiration
2040-08-10

AI Technical Summary

Technical Problem

The existing web application plug-in development method requires the SDK to be installed locally on the development terminal, which can easily lead to the theft of the SDK core code, and cannot guarantee the latest SDK version, leading to mismatched plug-in operation problems.

Method used

By obtaining the target plug-in script in the development terminal and sending it to the server to generate the plug-in page file, the development terminal renders the plug-in page file through the browser, avoiding local SDK installation, realizing plug-in development, and automatically updating the SDK through the server to ensure version matching.

Benefits of technology

It enables plug-in development without installing the SDK, avoids the theft of SDK core code, ensures version matching for plug-in running, and reduces development complexity and professional requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114115813B
    Figure CN114115813B
Patent Text Reader

Abstract

The embodiment of the present invention provides a plug-in development method, device, electronic device, medium and program for a Web application. The development terminal obtains the newly developed target plug-in script through the plug-in development service, sends the target plug-in script to the server, and the server generates a plug-in page file. The development terminal opens the plug-in page file through the browser, and can render the Web page display content optimized by the target plug-in script. In the server, the plug-in page file is generated based on the SDK of the Web application and the target plug-in script, so the development terminal does not need to install the SDK. Plug-in development is achieved without installing the SDK on the development terminal, avoiding the theft of the SDK core code caused by the development terminal installing the SDK. At the same time, the server can automatically update the SDK in real time, generate the plug-in page file based on the latest version of the SDK, and avoid the version mismatch problem caused by the untimely SDK update.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device, medium and program for developing a plug-in for a Web application. Background Art

[0002] Web applications refer to applications that are accessed through a browser. Most existing web applications that support extensions are usually developed and debugged based on the development kit (hereinafter referred to as SDK) provided by them when developers develop plug-ins for them. Most development methods require the SDK to be installed locally on the development terminal in order to be combined with the local IDE. However, when the SDK is installed on the local development terminal, developers may analyze the technology or modify the code for other purposes, resulting in the theft of technical knowledge. On the other hand, developers usually focus on their own plug-ins and ignore the update of the SDK version. If the SDK version is not updated in time, it may cause the plug-in to be inconsistent with the online SDK version after it goes online, resulting in failure to run normally.

[0003] It can be seen that the existing method of developing plug-ins requires the SDK to be installed locally on the development terminal, which easily causes the SDK core code to be stolen, and cannot ensure that the SDK of the development terminal is the latest version of the SDK. Summary of the invention

[0004] The embodiments of the present invention provide a method, device, electronic device, medium and program for developing a plug-in for a Web application, so as to solve the problem that the existing way of developing a plug-in requires the SDK to be installed locally on the development terminal, which easily causes the SDK core code to be stolen, and cannot ensure that the SDK of the development terminal is the latest version of the SDK.

[0005] In view of the above technical problems, in a first aspect, an embodiment of the present invention provides a plug-in development method for a Web application, which is applied to a development terminal, wherein the development terminal includes a browser and a plug-in development service provided by a plug-in development scaffold, and the plug-in development method for the Web application includes:

[0006] Obtaining a target plug-in script through the plug-in development service; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script;

[0007] Sending the target plug-in script to a server so that the server generates a plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development tool kit SDK;

[0008] The plug-in page file is obtained through the browser, and a Web page is rendered according to the plug-in page file.

[0009] In a second aspect, an embodiment of the present invention provides a method for developing a plug-in for a Web application, which is applied to a server, wherein the server includes a Web application, and the method for developing a plug-in for the Web application includes:

[0010] Receiving a target plug-in script sent by a development terminal; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script;

[0011] Generate a plug-in page file according to the target plug-in script, and generate a page push message after generating the plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK;

[0012] The page push message is sent to the development terminal, so that the development terminal obtains the plug-in page file after receiving the page push message, and renders a Web page according to the plug-in page file.

[0013] In a third aspect, an embodiment of the present invention provides a plug-in development device for a Web application, which is applied to a development terminal, wherein the development terminal includes a browser and a plug-in development service provided by a plug-in development scaffold, and the plug-in development device for the Web application includes:

[0014] An acquisition module, used for acquiring a target plug-in script through the plug-in development service; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script;

[0015] A first sending module is used to send the target plug-in script to a server so that the server generates a plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development tool kit SDK;

[0016] The rendering module is used to obtain the plug-in page file through the browser and render a Web page according to the plug-in page file.

[0017] In a fourth aspect, an embodiment of the present invention provides a plug-in development device for a Web application, which is applied to a server, wherein the server includes a Web application, and the plug-in development device for the Web application includes:

[0018] A receiving module, configured to receive a target plug-in script sent by a development terminal; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script;

[0019] A generation module, used to generate a plug-in page file according to the target plug-in script, and generate a page push message after generating the plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK;

[0020] The second sending module is used to send the page push message to the development terminal, so that the development terminal obtains the plug-in page file after receiving the page push message, and renders a Web page according to the plug-in page file.

[0021] In a fifth aspect, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned Web application plug-in development method when executing the program.

[0022] In a sixth aspect, an embodiment of the present invention provides a non-transitory readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned method for developing a plug-in for a Web application when executed by a processor.

[0023] In a seventh aspect, an embodiment of the present invention provides a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for developing a plug-in for a Web application.

[0024] The embodiments of the present invention provide a plug-in development method, device, electronic device, medium and program for a Web application. The development terminal obtains a newly developed target plug-in script through a plug-in development service, sends the target plug-in script to a server, and the server generates a plug-in page file. The development terminal opens the plug-in page file through a browser to render the optimized display content of the target plug-in script. In the server, a plug-in page file is generated based on the SDK of the Web application and the target plug-in script, so the development terminal does not need to install the SDK. Plug-in development is achieved without installing the SDK on the development terminal, avoiding the theft of the SDK core code caused by the development terminal installing the SDK. At the same time, the server can automatically update the SDK in real time, generate a plug-in page file based on the latest version of the SDK, and avoid the version mismatch problem caused by untimely SDK updates. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0026] Figure 1 It is a flowchart of a method for developing a plug-in for a Web application provided by an embodiment of the present invention;

[0027] Figure 2 is a flowchart of a method for developing a plug-in for a Web application provided by another embodiment of the present invention;

[0028] Figure 3 This is a schematic diagram of information interaction between a development terminal and a server during a plug-in development process for a Web application provided by another embodiment of the present invention;

[0029] Figure 4 is a schematic diagram of an implementation process of a plug-in development process of a Web application provided by another embodiment of the present invention;

[0030] Figure 5 It is a schematic diagram of the stages of plug-in development of a Web application provided by another embodiment of the present invention;

[0031] Figure 6 is a structural block diagram of a plug-in development device for a Web application provided by another embodiment of the present invention;

[0032] Figure 7 is a structural block diagram of a plug-in development device for a Web application provided by another embodiment of the present invention;

[0033] Figure 8 It is a schematic diagram of the physical structure of an electronic device provided by another embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] Figure 1 The flowchart of the plug-in development method for a Web application provided in this embodiment is applied to a development terminal, wherein the development terminal includes a browser and a plug-in development service provided by a plug-in development scaffold. Figure 1 , the plug-in development method of the Web application includes:

[0036] Step 101: obtaining a target plug-in script through the plug-in development service; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script.

[0037] After running the plug-in development scaffold, the plug-in development scaffold will automatically create a plug-in development service to obtain the target plug-in script edited by the developer. The plug-in development service provides a code input box to obtain the target plug-in script written by the developer.

[0038] In the embodiment of the present application, the target plug-in script depends on the Web application for use, and can be used to expand and optimize the functions of the Web application, or to repair vulnerabilities and bugs in the Web application, or to optimize the front-end display effect of the Web application, etc. For the convenience of description, the following mainly takes the optimization of the front-end display effect of the Web application as an example for explanation.

[0039] Step 102: Send the target plug-in script to a server so that the server generates a plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development tool kit SDK.

[0040] It should be noted that the server stores the latest version of the Web application SDK, so the server can generate a plug-in page file based on the received target plug-in script and the stored latest SDK. The generated plug-in page file can be an HTML file, that is, the server directly generates a plug-in page file that can be opened by a browser. The plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK, so after opening the plug-in page file, the Web page display content optimized by the target plug-in script can be rendered.

[0041] Each time the server receives the target plug-in script sent by the development terminal, it generates a plug-in page file based on the latest development toolkit SDK and the target plug-in script. Since the server can automatically update the SDK in real time, the plug-in page file generated each time can be based on the latest SDK, avoiding version mismatch problems caused by untimely SDK updates.

[0042] Step 103: Obtain the plug-in page file through the browser, and render a Web page according to the plug-in page file.

[0043] The browser obtains the plug-in page file, and opening the plug-in page file can display the Web page display content optimized by the target plug-in script.

[0044] In this embodiment, the plug-in development service of the development terminal directly sends the target plug-in script to the server, and the server's Web application directly generates a plug-in page file based on the SDK in the server, and the plug-in page file includes the display content optimized by the target plug-in script. The plug-in page file is pushed to the development terminal by the server, so that the plug-in page file is opened through the browser in the development terminal, and the display content of the Web page optimized by the target plug-in script is displayed. It can be seen that this embodiment realizes the process of developing plug-ins for Web applications without installing the SDK source code in the development terminal through the online interaction between the development terminal and the server.

[0045] This embodiment provides a plug-in development method for a Web application, in which a development terminal obtains a newly developed target plug-in script through a plug-in development service, and sends the target plug-in script to a server. The server generates a plug-in page file based on the stored SDK and the target plug-in script, and displays the plug-in page file through the browser of the development terminal. The Web page rendered according to the plug-in page file includes the optimized display content of the target plug-in script. The development terminal interacts with the server in this online way, so that the development terminal can realize plug-in development without installing the SDK, avoiding the theft of the SDK core code caused by the development terminal installing the SDK. At the same time, the server can automatically update the SDK in real time, and support the operation of the target plug-in script based on the latest version of the SDK, avoiding the version mismatch problem caused by the untimely SDK update.

[0046] In addition, there is no need to install the SDK on the development terminal, which avoids the cumbersome SDK dependency installation and startup process and reduces the professional requirements for developers.

[0047] Further, based on the above embodiment, obtaining the plug-in page file through the browser includes:

[0048] After receiving the page push message sent by the server, obtaining the page address of the page opened in the browser, or obtaining the page address corresponding to the plug-in page file from the page push message, and obtaining the plug-in page file through the browser according to the page address;

[0049] The page push message is generated by the server after detecting a new plug-in page file; the opened page is the first page opened when accessing the Web application or a Web page rendered last time.

[0050] There are two ways to get plug-in page files through the browser:

[0051] The first type: the address of the plug-in page file generated by the server each time is the same as the page address of the opened page, and the page push message is only used to indicate to the development terminal that the plug-in of the Web application has been updated. In this case, the browser obtains the plug-in page file according to the page address of the opened page (i.e., refreshes the opened page).

[0052] The second type: each time the plug-in page file generated by the server sets a new page address, the server carries the page address corresponding to the plug-in page file in the page push message. In this case, the browser obtains the plug-in page file according to the page address in the page push message.

[0053] In this embodiment, the development terminal acquires the plug-in page file through the page push message sent by the server, and then displays the Web page corresponding to the plug-in page file in the browser of the development terminal. The optimized display content of the target plug-in script is displayed through the Web page, and the debugging process of plug-in development is realized in an online manner.

[0054] Furthermore, based on the above embodiments, it also includes:

[0055] Determine a plug-in script to be updated through the plug-in development service, and send the plug-in script to be updated to the server, so that the server upgrades the Web application according to the plug-in script to be updated;

[0056] The plug-in script to be updated is a target plug-in script that is most recently acquired by the plug-in development service after the plug-in development is completed.

[0057] After receiving the indication information of the completion of plug-in development (for example, the indication information is generated by the developer's key trigger of the completion of plug-in development), the plug-in development service obtains the most recently detected target plug-in script as the plug-in script to be updated. The plug-in script to be updated is sent to the server, and the server upgrades the plug-in of the Web application and promotes the upgraded Web application to each client terminal.

[0058] In this embodiment, after the debugging of the plug-in development is completed, the plug-in script to be updated is sent to the server, thereby realizing the upgrade of the Web application.

[0059] It should be noted that the scaffolding of the development terminal can be pre-installed in the development terminal, or it can be a scaffolding installation package downloaded from the server, and the scaffolding is installed through the scaffolding installation package before plug-in development. Start the plug-in development scaffolding, and the plug-in development scaffolding automatically creates a plug-in development service.

[0060] In this embodiment, before sending the target plug-in script to the server, the method further includes:

[0061] A communication connection with a server is established through the plug-in development service, and the target plug-in script is sent to the server through the communication connection with the server.

[0062] Figure 2 The flowchart of the plug-in development method for a Web application provided in this embodiment is applied to a server, wherein the server includes a Web application. Figure 2 , the plug-in development methods for Web applications include:

[0063] Step 201: receiving a target plug-in script sent by a development terminal; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script.

[0064] After the development terminal detects the target plug-in script newly written by the developer, it sends the target plug-in script to the server. The server receives the target plug-in script and generates a plug-in page file containing the optimized display effect of the target plug-in script through the SDK of the server.

[0065] Step 202: Generate a plug-in page file according to the target plug-in script, and generate a page push message after generating the plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK.

[0066] Each time the server receives the target plug-in script sent by the development terminal, it generates a plug-in page file based on the latest SDK and the target plug-in script. Since the server can automatically update the SDK in real time, the plug-in page file generated each time can be based on the latest SDK, avoiding version mismatch problems caused by untimely SDK updates.

[0067] Step 203: Send the page push message to the development terminal, so that the development terminal obtains the plug-in page file after receiving the page push message, and renders a Web page according to the plug-in page file.

[0068] After receiving the target plug-in script, the server generates a plug-in page file based on the server's SDK and sends the plug-in page file to the development terminal. The web page corresponding to the plug-in page file can be displayed directly through the browser of the development terminal. Through this online mode of the development terminal and the server, the browser can see the optimized display content of the target plug-in script, so as to debug the plug-in development according to the display content corresponding to the target plug-in script. It can be seen that through the plug-in page file pushed by the server, the development terminal can realize the development of the target plug-in script without installing the SDK.

[0069] This embodiment provides a plug-in development method for a Web application. The development terminal obtains the newly developed target plug-in script through the plug-in development service, sends the target plug-in script to the server, and the server generates a plug-in page file. The development terminal opens the plug-in page file through the browser to render the optimized display content of the target plug-in script. In the server, the plug-in page file is generated based on the SDK of the Web application and the target plug-in script, so the development terminal does not need to install the SDK. Plug-in development is achieved without installing the SDK on the development terminal, avoiding the theft of the SDK core code caused by the development terminal installing the SDK. At the same time, the server can automatically update the SDK in real time, generate the plug-in page file based on the latest version of the SDK, and avoid the version mismatch problem caused by the untimely SDK update.

[0070] Further, based on the above embodiment, generating a page push message after generating the plug-in page file includes:

[0071] After generating the plug-in page file, obtaining a page address corresponding to the plug-in page file, and generating a page push message including the page address, so that the development terminal obtains the plug-in page file according to the page address in the page push message;

[0072] Alternatively, after generating the plug-in page file, a page push message is generated to indicate that the plug-in of the Web application has been updated, so that after receiving the page push message, the development terminal obtains the plug-in page file according to the page address of the page opened in the browser; wherein the opened page is the first page opened by accessing the Web application or the Web page rendered last time.

[0073] Specifically, the server can generate two types of page push messages:

[0074] The first type: the page push message is only used to indicate to the development terminal that the plug-in of the Web application has been updated. In this case, the address corresponding to the plug-in page file generated by the server each time is the same as the page address of the opened page, so the browser obtains the plug-in page file according to the page address of the opened page (i.e., refreshes the opened page).

[0075] The second method: the page push message carries the page address corresponding to the plug-in page file. In this case, the server sets a new page address for each plug-in page file generated, and carries the new page address in the page push message, so that the browser can obtain the plug-in page file according to the page address in the page push message.

[0076] In this embodiment, the server provides a way for the development terminal to obtain the plug-in page file through a page push message, and then displays the optimized display content of the target plug-in script according to the obtained plug-in page file, thereby realizing the plug-in development process without installing the SDK on the development terminal.

[0077] Furthermore, based on the above embodiments, it also includes:

[0078] Receiving a plug-in script to be updated sent by the development terminal, and upgrading the Web application according to the plug-in script to be updated;

[0079] Among them, the updated plug-in script is the target plug-in script most recently acquired by the plug-in development service of the development terminal after the plug-in development is completed; the target plug-in script is the plug-in script generated for the first time for the newly developed plug-in of the Web application or the plug-in script generated by modifying the existing plug-in script.

[0080] Furthermore, the server upgrades the plug-in of the Web application and promotes the upgraded Web application to each client terminal.

[0081] In this embodiment, after receiving the plug-in script to be updated, the server completes the upgrade of the Web application, thereby promoting the upgraded Web application to the client terminal, thereby achieving the promotion of the Web application supporting the new plug-in.

[0082] Figure 3 This is a schematic diagram of information interaction between the development terminal and the server during the development of a plug-in for a Web application provided in this embodiment. Figure 3 The plug-in development process of the Web application is participated by the browser and plug-in development service of the development terminal, and the Web application of the server containing the SDK. The browser and the Web application of the server interact with each other and transmit the plug-in page file to display the Web page display content optimized by the target plug-in script in the browser. The plug-in development service interacts with the Web application of the server and transmits the target plug-in script so that the server generates the plug-in page file based on the latest SDK.

[0083] Figure 4 A schematic diagram of the implementation process of the plug-in development process of the Web application provided in this embodiment, Figure 5 A schematic diagram of the stages of Web application plug-in development provided in this embodiment, see Figure 4 and Figure 5 The plug-in development process of the Web application is implemented by installing the scaffolding, starting the scaffolding, using the editor to open the plug-in directory, opening the Web application, and debugging the plug-in development process (including writing / modifying plug-in scripts, monitoring file changes, compiling, and viewing the plug-in running effect).

[0084] Specifically, the development of plug-ins for Web applications includes the following:

[0085] In the initialization phase, the plug-in development scaffold is installed, the plug-in development scaffold is started, and the plug-in development service is created. At the same time, the Web application is started through the browser to establish a communication connection between the development terminal and the server's Web application.

[0086] During the debugging phase, the plug-in development service compiles the plug-in code and sends it to the server. The server pushes the page to the terminal based on the plug-in code, so that the terminal updates the displayed page to implement the debugging process.

[0087] In the release phase, the plug-in development is completed, and the release instructions are sent to the server. The server upgrades the Web application according to the plug-in code uploaded when the release instructions are submitted.

[0088] Figure 6 The structural block diagram of a plug-in development device for a Web application provided in this embodiment is applied to a development terminal, wherein the development terminal includes a browser and a plug-in development service provided by a plug-in development scaffold. The plug-in development device for a Web application includes an acquisition module 601, a first sending module 602, and a rendering module 603, wherein:

[0089] The acquisition module 601 is used to acquire a target plug-in script through the plug-in development service; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script;

[0090] A first sending module 602 is used to send the target plug-in script to a server so that the server generates a plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK;

[0091] The rendering module 603 is used to obtain the plug-in page file through the browser and render a Web page according to the plug-in page file.

[0092] The plug-in development device for a Web application provided in this embodiment is applicable to the plug-in development method for a Web application for a development terminal provided in the above embodiments, and will not be described in detail here.

[0093] This embodiment provides a plug-in development device for a Web application. The development terminal obtains the newly developed target plug-in script through the plug-in development service, sends the target plug-in script to the server, and the server generates a plug-in page file. The development terminal opens the plug-in page file through a browser to render the optimized display content of the target plug-in script. In the server, a plug-in page file is generated based on the SDK of the Web application and the target plug-in script, so the development terminal does not need to install the SDK. Plug-in development is achieved without the need to install the SDK on the development terminal, avoiding the theft of the SDK core code caused by the development terminal installing the SDK. At the same time, the server can automatically update the SDK in real time, generate a plug-in page file based on the latest version of the SDK, and avoid version mismatch problems caused by untimely SDK updates.

[0094] Optionally, obtaining the plug-in page file through the browser includes:

[0095] After receiving the page push message sent by the server, obtaining the page address of the page opened in the browser, or obtaining the page address corresponding to the plug-in page file from the page push message, and obtaining the plug-in page file through the browser according to the page address;

[0096] The page push message is generated by the server after detecting a new plug-in page file; the opened page is the first page opened when accessing the Web application or a Web page rendered last time.

[0097] Optionally, it also includes:

[0098] Determine a plug-in script to be updated through the plug-in development service, and send the plug-in script to be updated to the server, so that the server upgrades the Web application according to the plug-in script to be updated;

[0099] The plug-in script to be updated is a target plug-in script that is most recently acquired by the plug-in development service after the plug-in development is completed.

[0100] Figure 7 The structural block diagram of a plug-in development device for a Web application provided in this embodiment is applied to a server, wherein the server includes a Web application. The plug-in development device for the Web application includes a receiving module 701, a generating module 702 and a second sending module 703, wherein:

[0101] The receiving module 701 is used to receive a target plug-in script sent by a development terminal; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script;

[0102] A generation module 702, configured to generate a plug-in page file according to the target plug-in script, and generate a page push message after generating the plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK;

[0103] The second sending module 703 is used to send the page push message to the development terminal, so that the development terminal obtains the plug-in page file after receiving the page push message, and renders a Web page according to the plug-in page file.

[0104] The plug-in development device for a Web application provided in this embodiment is applicable to the plug-in development method for a Web application applicable to a server provided in the above embodiments, and will not be described in detail here.

[0105] This embodiment provides a plug-in development device for a Web application. The development terminal obtains the newly developed target plug-in script through the plug-in development service, sends the target plug-in script to the server, and the server generates a plug-in page file. The development terminal opens the plug-in page file through a browser to render the optimized display content of the target plug-in script. In the server, a plug-in page file is generated based on the SDK of the Web application and the target plug-in script, so the development terminal does not need to install the SDK. Plug-in development is achieved without the need to install the SDK on the development terminal, avoiding the theft of the SDK core code caused by the development terminal installing the SDK. At the same time, the server can automatically update the SDK in real time, generate a plug-in page file based on the latest version of the SDK, and avoid version mismatch problems caused by untimely SDK updates.

[0106] Optionally, generating a page push message after generating the plug-in page file includes:

[0107] After generating the plug-in page file, obtaining a page address corresponding to the plug-in page file, and generating a page push message including the page address, so that the development terminal obtains the plug-in page file according to the page address in the page push message;

[0108] Alternatively, after generating the plug-in page file, a page push message is generated to indicate that the plug-in of the Web application has been updated, so that after receiving the page push message, the development terminal obtains the plug-in page file according to the page address of the page opened in the browser; wherein the opened page is the first page opened by accessing the Web application or the Web page rendered last time.

[0109] Optionally, it also includes:

[0110] Receiving a plug-in script to be updated sent by the development terminal, and upgrading the Web application according to the plug-in script to be updated;

[0111] Among them, the updated plug-in script is the target plug-in script most recently acquired by the plug-in development service of the development terminal after the plug-in development is completed; the target plug-in script is the plug-in script generated for the first time for the newly developed plug-in of the Web application or the plug-in script generated by modifying the existing plug-in script.

[0112] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8 As shown, the electronic device may include: a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802 and the memory 803 communicate with each other through the communication bus 804. The processor 801 may call the logic instructions in the memory 803 to execute the following method:

[0113] Obtaining a target plug-in script through the plug-in development service; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script; sending the target plug-in script to a server so that the server generates a plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK; obtaining the plug-in page file through the browser, and rendering a Web page according to the plug-in page file;

[0114] Alternatively, a target plug-in script is received from a development terminal; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script; a plug-in page file is generated according to the target plug-in script, and a page push message is generated after the plug-in page file is generated; wherein the plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK; the page push message is sent to the development terminal, so that the development terminal obtains the plug-in page file after receiving the page push message, and renders a Web page according to the plug-in page file.

[0115] In addition, the logic instructions in the above-mentioned memory 803 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0116] Furthermore, an embodiment of the present invention discloses a computer program product, the computer program product comprising a computer program stored on a non-transitory readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer can execute the methods provided by the above method embodiments, for example, including:

[0117] Obtaining a target plug-in script through the plug-in development service; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script; sending the target plug-in script to a server so that the server generates a plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK; obtaining the plug-in page file through the browser, and rendering a Web page according to the plug-in page file;

[0118] Alternatively, a target plug-in script is received from a development terminal; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script; a plug-in page file is generated according to the target plug-in script, and a page push message is generated after the plug-in page file is generated; wherein the plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK; the page push message is sent to the development terminal, so that the development terminal obtains the plug-in page file after receiving the page push message, and renders a Web page according to the plug-in page file.

[0119] On the other hand, an embodiment of the present invention further provides a non-transitory readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the transmission method provided in the above embodiments is implemented, for example, including:

[0120] Obtaining a target plug-in script through the plug-in development service; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script; sending the target plug-in script to a server so that the server generates a plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK; obtaining the plug-in page file through the browser, and rendering a Web page according to the plug-in page file;

[0121] Alternatively, a target plug-in script is received from a development terminal; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script; a plug-in page file is generated according to the target plug-in script, and a page push message is generated after the plug-in page file is generated; wherein the plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK; the page push message is sent to the development terminal, so that the development terminal obtains the plug-in page file after receiving the page push message, and renders a Web page according to the plug-in page file.

[0122] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0123] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for developing plug-ins for Web applications. It is characterized in that Applied to a development terminal, the development terminal includes a browser and a plug-in development service provided by a plug-in development scaffold, and the plug-in development method of a Web application includes: Obtaining a target plug-in script through the plug-in development service; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script; Sending the target plug-in script to a server so that the server generates a plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development tool kit SDK; The plug-in page file is obtained through the browser, and a Web page is rendered according to the plug-in page file; the Web page displays the display content optimized by the target plug-in script, thereby realizing the debugging process of plug-in development.

2. The method for developing a plug-in for a Web application according to claim 1, It is characterized in that The step of obtaining the plug-in page file through the browser includes: After receiving the page push message sent by the server, obtaining the page address of the page opened in the browser, or obtaining the page address corresponding to the plug-in page file from the page push message, and obtaining the plug-in page file through the browser according to the page address; The page push message is generated by the server after detecting a new plug-in page file; the opened page is the first page opened when accessing the Web application or a Web page rendered last time.

3. The method for developing a plug-in for a Web application according to claim 1, It is characterized in that Also includes: After the debugging of the plug-in development is completed, the plug-in script to be updated is determined by the plug-in development service, and the plug-in script to be updated is sent to the server, so that the server upgrades the Web application according to the plug-in script to be updated; The plug-in script to be updated is a target plug-in script that is most recently acquired by the plug-in development service after the plug-in development is completed.

4. A method for developing plug-ins for Web applications. It is characterized in that Applied to a server, the server includes a Web application, and the plug-in development method of the Web application includes: Receiving a target plug-in script sent by a development terminal; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script; Generate a plug-in page file according to the target plug-in script, and generate a page push message after generating the plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK; The page push message is sent to the development terminal, so that the development terminal obtains the plug-in page file after receiving the page push message, and renders a Web page according to the plug-in page file; the Web page displays the optimized display content of the target plug-in script, realizing the debugging process of plug-in development.

5. The method for developing a plug-in for a Web application according to claim 4, It is characterized in that The step of generating a page push message after generating the plug-in page file comprises: After generating the plug-in page file, obtaining a page address corresponding to the plug-in page file, and generating a page push message including the page address, so that the development terminal obtains the plug-in page file according to the page address in the page push message; Alternatively, after generating the plug-in page file, a page push message is generated to indicate that the plug-in of the Web application has been updated, so that after receiving the page push message, the development terminal obtains the plug-in page file according to the page address of the page opened in the browser; wherein the opened page is the first page opened by accessing the Web application or the Web page rendered last time.

6. The method for developing a plug-in for a Web application according to claim 4, It is characterized in that Also includes: Receiving a plug-in script to be updated sent by the development terminal, and upgrading the Web application according to the plug-in script to be updated; The update plug-in script is the target plug-in script that the plug-in development service of the development terminal obtains most recently after the plug-in development is completed; The target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script.

7. A plug-in development device for a Web application, It is characterized in that Applied to a development terminal, the development terminal includes a browser and a plug-in development service provided by a plug-in development scaffold, and the plug-in development device of a Web application includes: An acquisition module, used for acquiring a target plug-in script through the plug-in development service; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script; A first sending module is used to send the target plug-in script to a server so that the server generates a plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development tool kit SDK; The rendering module is used to obtain the plug-in page file through the browser and render a Web page according to the plug-in page file; the Web page displays the optimized display content of the target plug-in script to realize the debugging process of plug-in development.

8. A plug-in development device for a Web application, It is characterized in that Applied to a server, the server includes a Web application, and the plug-in development device of the Web application includes: A receiving module, configured to receive a target plug-in script sent by a development terminal; wherein the target plug-in script is a plug-in script generated for the first time for a newly developed plug-in of the Web application or a plug-in script generated by modifying an existing plug-in script; A generation module, used to generate a plug-in page file according to the target plug-in script, and generate a page push message after generating the plug-in page file; wherein the plug-in page file is generated based on the target plug-in script and the latest development toolkit SDK; The second sending module is used to send the page push message to the development terminal, so that the development terminal obtains the plug-in page file after receiving the page push message, and renders a Web page according to the plug-in page file; the Web page displays the display content optimized by the target plug-in script, realizing the debugging process of plug-in development.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps of the method for developing a plug-in for a Web application as claimed in any one of claims 1 to 6 are implemented.

10. A non-transitory readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method for developing a plug-in for a Web application as claimed in any one of claims 1 to 6 are implemented.

11. A computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method for developing a plug-in for a Web application as claimed in any one of claims 1 to 6 are implemented.