Business module development method, device, equipment and storage medium

Through the business module development method, the problem of non-separation of versions and logical interaction in multi-team cooperation is solved, the independent development and release of core modules and business modules is realized, and the maintainability and development efficiency of the code are improved.

CN113885840BActive Publication Date: 2024-10-29PING AN BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111216125.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-19
Publication Date
2024-10-29
Estimated Expiration
2041-10-19

AI Technical Summary

Technical Problem

When multiple teams work together to complete large-scale front-end development projects, the problems of non-separation of versions and logical interaction lead to reduced code maintainability.

Method used

Through a business module development method, including obtaining the business module development request, displaying the developer interface, starting the target core module and VSCode project, obtaining the module configuration file and business module code, packaging and testing the JS file, ensuring that the business module is consistent with the core module Independent development and independent publishing.

Benefits of technology

It realizes the independent development and release of core modules and business modules, avoids logical interaction, and improves code maintainability and development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113885840B_ABST
    Figure CN113885840B_ABST
Patent Text Reader

Abstract

The present application relates to the field of artificial intelligence technology, and discloses a method, device, equipment and storage medium for developing a business module, wherein the method includes: starting a target core module according to a developer interface; obtaining a VSCode project to be edited according to the developer interface; obtaining a module configuration file according to the developer interface; obtaining the business module code according to the VSCode project to be edited in the developer interface; packaging a JS file according to the business module code to obtain a business module to be analyzed; testing the business module to be analyzed according to the module configuration file and the target core module to obtain a business module test result; and determining the business module to be analyzed as a target business module when the business module test result is passed. The business module developers only need to focus on the development of the business module, and the independent development and independent release of the core module and the business module are realized, and finally the logic of the core module and the business module do not affect each other.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a business module development method, device, equipment and storage medium. Background Art

[0002] In order to speed up the launch of the system, multiple teams are used to work together to complete a large front-end development project. When multiple teams work together to complete a large front-end development project, they develop and release the same version. The logic of the code developed by different developers affects each other, resulting in too much version coupling of each functional module, which reduces the maintainability of the code. Summary of the invention

[0003] The main purpose of this application is to provide a business module development method, device, equipment and storage medium, aiming to solve the technical problems of the prior art when multiple teams work together to complete a large-scale front-end development project, such as the existence of versions that are not separated and logics that affect each other.

[0004] In order to achieve the above-mentioned invention object, the present application proposes a business module development method, the method comprising:

[0005] Obtain a business module development request, and display a developer interface according to the business module development request;

[0006] Start the target core module according to the developer interface;

[0007] Start the VSCode project according to the developer interface to obtain the VSCode project to be edited;

[0008] Obtaining a module configuration file according to the developer interface, wherein the module configuration file is used to express communication configuration data between the target core module and the VSCode project to be edited;

[0009] In the developer interface, obtain the business module code according to the VSCode project to be edited;

[0010] Pack the JS file according to the business module code to obtain the business module to be analyzed;

[0011] According to the module configuration file and the target core module, the business module to be analyzed is tested to obtain a business module test result;

[0012] When the service module test result is passed, the service module to be analyzed is determined as a target service module.

[0013] Furthermore, the step of obtaining a business module development request includes:

[0014] Get a software installation package, wherein the software installation package includes: a VSCode development tool installation package, a Vuex installation package, and a terminal installation package, and the terminal installation package includes: a module communication installation package and a core module installation package;

[0015] Install and configure the VSCode development tool installation packages respectively to obtain the VSCode development tool;

[0016] Based on the VSCode development tool, the Vuex state management module is installed and configured for the Vuex installation package to obtain the development tool to be processed;

[0017] In the development tool to be processed, the terminal installation package is installed to obtain a target development tool, wherein the target development tool includes: the VSCode development tool, the Vuex state management module, the module communication module and the core module to be processed;

[0018] The target development tool is called to obtain the business module development request.

[0019] Furthermore, the step of starting the target core module according to the developer interface includes:

[0020] Obtaining a core module startup request according to the developer interface;

[0021] The core module to be processed is started according to the core module start request to obtain the target core module.

[0022] Further, the step of starting the VSCode project according to the developer interface to obtain the VSCode project to be edited includes:

[0023] Obtain a VSCode project creation request according to the developer interface;

[0024] Create a VSCode project according to the VSCode project creation request to obtain a VSCode project to be processed;

[0025] Obtain a VSCode project confirmation request according to the VSCode project to be processed;

[0026] According to the VSCode project determination request, the VSCode project to be processed is started to obtain the VSCode project to be edited.

[0027] Further, the step of testing the business module to be analyzed according to the module configuration file and the target core module to obtain the business module test result includes:

[0028] Calling the module communication module according to the module configuration file enables communication between the business module to be analyzed and the target core module;

[0029] Get the test case set;

[0030] Based on the communication between the business module to be analyzed and the target core module, the business module to be analyzed is tested according to the target core module and the test case set to obtain the business module test result.

[0031] Furthermore, when the test result of the business module is passed, after the step of determining the business module to be analyzed as the target business module, the method further includes:

[0032] Get the business module upload request;

[0033] In response to the business module upload request, generating target import configuration data corresponding to the target business module according to the module configuration file;

[0034] The version identifier of the target core module, the target import configuration data and the target business module are sent to the server as associated data, wherein the server packages the front-end application system according to the version identifier of the target core module, each target import configuration data and each target business module to obtain the target front-end application system.

[0035] Further, the step of packaging the front-end application system according to the version identifier of the target core module, each of the target imported configuration data and each of the target business modules to obtain the target front-end application system includes:

[0036] Put the target business module into the business code warehouse;

[0037] Obtaining an application system publishing request, wherein the application system publishing request carries a first version identifier and multiple second version identifiers;

[0038] Responding to the application system publishing request, obtaining a configuration script;

[0039] Execute the configuration script, obtain the core module from the core code repository according to the first version identifier, and obtain the core module to be processed;

[0040] Execute the configuration script, obtain a business module from the business code repository according to each second version identifier, and obtain a business module to be packaged;

[0041] Execute the configuration script, import the configuration data corresponding to each second version identifier, update the Script tag import configuration parameters in the core module to be processed, and obtain the core module to be packaged;

[0042] The front-end application system is packaged according to the core module to be packaged and each of the business modules to be packaged to obtain the target front-end application system.

[0043] The present application also proposes a business module development device, the device comprising:

[0044] A request acquisition module, used to acquire a business module development request and display a developer interface according to the business module development request;

[0045] A target core module determination module, used for starting the target core module according to the developer interface;

[0046] A VSCode project to be edited determining module, used to start the VSCode project according to the developer interface to obtain the VSCode project to be edited;

[0047] A module configuration file acquisition module, used to acquire a module configuration file according to the developer interface, wherein the module configuration file is used to express the communication configuration data between the target core module and the VSCode project to be edited;

[0048] A business module code acquisition module, used to acquire the business module code according to the VSCode project to be edited in the developer interface;

[0049] The business module acquisition module to be analyzed is used to package the JS file according to the business module code to obtain the business module to be analyzed;

[0050] A business module test result acquisition module is used to test the business module to be analyzed according to the module configuration file and the target core module to obtain a business module test result;

[0051] The target business module acquisition module is used to determine the business module to be analyzed as a target business module when the test result of the business module is passed.

[0052] The present application also proposes a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.

[0053] The present application also proposes a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0054] The business module development method, device, equipment and storage medium of the present application, wherein the method first displays a developer interface according to the business module development request, and then starts the target core module according to the developer interface, starts the VSCode project according to the developer interface, obtains the VSCode project to be edited, obtains the module configuration file according to the developer interface, and then in the developer interface, obtains the business module code according to the VSCode project to be edited, packages the JS file according to the business module code, and obtains the business module to be analyzed, and finally tests the business module to be analyzed according to the module configuration file and the target core module to obtain the business module test result. When the business module test result is passed, the business module to be analyzed is determined as the target business module, so that the business module developers only need to focus on the development of the business module, realizes the independent development and independent release of the core module and the business module, and finally achieves the effect that the logic of the core module and the business module do not affect each other. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 A flowchart of a business module development method according to an embodiment of the present application;

[0056] Figure 2 This is a schematic block diagram of the structure of a business module development device according to an embodiment of the present application;

[0057] Figure 3 A schematic block diagram of the structure of a computer device according to an embodiment of the present application.

[0058] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0060] Reference Figure 1 In an embodiment of the present application, a method for developing a business module is provided, the method comprising:

[0061] S1: Obtain a business module development request, and display a developer interface according to the business module development request;

[0062] S2: Start the target core module according to the developer interface;

[0063] S3: Start the VSCode project according to the developer interface to obtain the VSCode project to be edited;

[0064] S4: Obtain a module configuration file according to the developer interface, wherein the module configuration file is used to express communication configuration data between the target core module and the VSCode project to be edited;

[0065] S5: In the developer interface, obtain the business module code according to the VSCode project to be edited;

[0066] S6: Packaging the JS file according to the business module code to obtain the business module to be analyzed;

[0067] S7: testing the business module to be analyzed according to the module configuration file and the target core module to obtain a business module test result;

[0068] S8: When the service module test result is passed, the service module to be analyzed is determined as a target service module.

[0069] This embodiment first displays a developer interface according to the business module development request, and then starts the target core module according to the developer interface, starts the VSCode project according to the developer interface, obtains the VSCode project to be edited, obtains the module configuration file according to the developer interface, and then in the developer interface, obtains the business module code according to the VSCode project to be edited, packages the JS file according to the business module code, and obtains the business module to be analyzed, and finally tests the business module to be analyzed according to the module configuration file and the target core module to obtain the business module test result. When the business module test result is passed, the business module to be analyzed is determined as the target business module, so that the business module developers only need to focus on the development of the business module, realizes the independent development and independent release of the core module and the business module, and finally achieves the effect that the logic of the core module and the business module do not affect each other.

[0070] For S1, a business module development request input by a user may be obtained, and a business module development request sent by a third-party application system may also be obtained.

[0071] A business module development request is a request to develop a business module.

[0072] When the business module development request is obtained, a developer interface is opened.

[0073] The developer interface is based on the VSCode code editor.

[0074] VSCode, the full name of Visual Studio Code, is a cross-platform source code editor that runs on operating systems (Mac OS, Windows, and Linux) for writing modern Web (Global Wide Area Network) and cloud applications. It can run on the desktop and can be used for Mac OS, Windows, and Linux.

[0075] For S2, according to the developer interface, the core module to be processed is started, and the target core module is obtained after the startup is completed.

[0076] The core modules to be processed are responsible for providing the general functions of the front-end application system. For example, the core modules to be processed include: the function of parsing and rendering business modules, the function of providing general function interfaces, and the function of system login, which are not specifically limited in this example.

[0077] For S3, according to the developer interface, a preset project startup method is used to start the VSCode project, and the started VSCode project is used as the VSCode project to be edited.

[0078] It is understandable that starting a VSCode project using a preset project startup method can be to create and start a new VSCode project, or to open and start an already created VSCode project.

[0079] It can be understood that step S2 and step S3 can also be performed in the order of step S3 and step S2.

[0080] For S4, a module configuration file input by a user is obtained according to the developer interface.

[0081] The module configuration file enables the target core module to introduce the business module in the form of a Script tag to achieve communication between the target core module and the VSCode project to be edited.

[0082] Script tag, that is <script>标签,用于定义客户端脚本,比如,JavaScript(具有函数优先的轻量级,解释型或即时编译型的编程语言)。

[0083] 对于S5,业务模块代码是多个字符串,不属于同一段的字符串之间用间隔符隔开。

[0084] 在所述开发者界面中,根据所述待编辑的VSCode工程获取用户输入的业务模块代码。

[0085] 对于S6,采用预设的JS文件打包规则,对所述业务模块代码进行打包,将打包得到的JS文件作为所述待分析的业务模块。

[0086] JS文件,是将Javascript脚本放入一个文件类并以js扩展名命名一种文本脚本。

[0087] 待分析的业务模块,是负责专业领域的功能。比如,待分析的业务模块包括但不限于:营销领域的抽奖模块、商城领域的商品销售模块、理财领域的产品销售模块,在此举例不做具体限定。

[0088] 对于S7,根据所述模块配置文件,使所述目标核心模块与所述待分析的业务模块通信,基于该通信,采用获取的测试用例集对所述待分析的业务模块进行联合测试,当对所述测试用例集全部测试通过时确定业务模块测试结果为通过,否则,确定业务模块测试结果为未通过。

[0089] 当所述业务模块测试结果为未通过时,重复执行步骤S5至S7,直至所述业务模块测试结果为通过。

[0090] 对于S8,当所述业务模块测试结果为通过时,意味着所述待分析的业务模块与所述核心模块之间的联合测试通过,因此可以将所述待分析的业务模块确定为目标业务模块。从而在业务模块开发人员的本地电脑中完成了业务模块的开发和联合测试。

[0091] 在一个实施例中,上述获取业务模块开发请求的步骤,包括:

[0092] S11:获取软件安装包,其中,所述软件安装包包括:VSCode开发工具安装包、Vuex安装包和终端安装包,所述终端安装包包括:模块通信安装包和核心模块安装包;

[0093] S12:对所述VSCode开发工具安装包分别进行安装及配置,得到VSCode开发工具;

[0094] S13:基于所述VSCode开发工具,对所述Vuex安装包分别进行Vuex状态管理模块的安装及配置,得到待处理的开发工具;

[0095] S14:在所述待处理的开发工具中,根据所述终端安装包进行安装,得到目标开发工具,其中,所述目标开发工具包括:所述VSCode开发工具、所述Vuex状态管理模块、模块通信模块和待处理的核心模块;

[0096] S15:调用所述目标开发工具,获取所述业务模块开发请求。

[0097] 本实施例通过终端安装包获得待处理的核心模块,以及连接核心模块和业务模块的模块通信模块,通过核心模块安装包的方式避免了核心模块代码的泄漏,提高了核心模块代码的安全性;通过模块通信模块使核心模块和业务模块通信,为在业务模块开发人员的本地电脑中完成了业务模块的开发和联合测试提供了基础,也有利于使核心模块和业务模块的独立开发、独立发版,最终达到核心模块和业务模块的逻辑互相不影响的效果。

[0098] 对于S11,可以获取用户输入的软件安装包,也可以获取第三方应用系统发送的软件安装包。

[0099] VSCode开发工具安装包,是VSCode开发工具的安装包。

[0100] Vuex安装包,是状态管理模块的安装包。Vuex,是适用于在Vue项目开发时使用的状态管理工具。

[0101] 模块通信安装包,是核心模块与业务模块通信管理的安装包。

[0102] 核心模块安装包,是核心模块的安装包。

[0103] 对于S12,对所述VSCode开发工具安装包进行安装,基于安装得到的初始开发工具获取VSCode配置数据,将完成配置的初始开发工具作为所述VSCode开发工具。

[0104] 对于S13,基于所述VSCode开发工具,对所述Vuex安装包进行安装,得到初始状态管理模块;基于初始状态管理模块获取Vuex配置数据,将完成配置的初始状态管理模块作为所述Vuex状态管理模块;将包含所述Vuex状态管理模块的所述VSCode开发工具作为所述待处理的开发工具。

[0105] 对于S14,在所述待处理的开发工具中,对所述终端安装包的核心模块安装包进行安装,得到待处理的核心模块,对所述终端安装包的模块通信安装包进行安装,得到模块通信模块,将所述VSCode开发工具、所述Vuex状态管理模块、模块通信模块和待处理的核心模块作为所述目标开发工具。

[0106] 模块通信模块,是通过所述Vuex状态管理模块在核心模块和业务模块之间进行通信。

[0107] 可以理解的是,所述待处理的核心模块还可以根据服务端下发的安装包进行自动更新,也可以是业务模块开发人员从服务端下载安装包后进行手动更新。

[0108] 对于S15,调用所述目标开发工具,可以获取用户输入的业务模块开发请求,也可以获取第三方应用系统发送的业务模块开发请求。

[0109] 在一个实施例中,上述根据所述开发者界面启动目标核心模块的步骤,包括:

[0110] S21:根据所述开发者界面获取核心模块启动请求;

[0111] S22:根据所述核心模块启动请求启动所述待处理的核心模块,得到所述目标核心模块。

[0112] 本实施例实现了基于请求启动核心模块,为模块配置文件的获取、对所述待分析的业务模块进行测试提供了基础。

[0113] 对于S21,通过所述开发者界面,可以获取用户输入的核心模块启动请求,也可以是实现本申请的程序文件根据预设条件主动触发的核心模块启动请求。比如,所述预设条件为收到开发者界面打开完成信号,在此举例不做具体限定。

[0114] 核心模块启动请求,也就是对所述待处理的核心模块进行启动的请求。

[0115] 对于S22,在获取到所述核心模块启动请求时,对所述待处理的核心模块进行启动,所述待处理的核心模块完成启动后作为所述目标核心模块。

[0116] 在一个实施例中,上述根据所述开发者界面启动VSCode工程,得到待编辑的VSCode工程的步骤,包括:

[0117] S31:根据所述开发者界面获取VSCode工程新建请求;

[0118] S32:根据所述VSCode工程新建请求创建VSCode工程,得到待处理的VSCode工程;

[0119] S33:根据所述待处理的VSCode工程获取VSCode工程确定请求;

[0120] S34:根据所述VSCode工程确定请求,对所述待处理的VSCode工程进行启动,得到所述待编辑的VSCode工程。

[0121] 本实施例基于请求创建VSCode工程并对VSCode工程进行启动,为在业务模块开发人员的本地电脑中完成了业务模块的开发和联合测试提供了基础。

[0122] 对于S31,根据所述开发者界面获取用户输入的VSCode工程新建请求。

[0123] VSCode工程新建请求,是创建VSCode工程的请求。

[0124] 对于S32,在获取到所述VSCode工程新建请求时,采用预设的VSCode工程创建规则创建VSCode工程,将创建的VSCode工程作为所述待处理的VSCode工程。

[0125] 对于S33,根据所述待处理的VSCode工程获取用户输入的VSCode工程确定请求。

[0126] VSCode工程确定请求,也就是将所述待处理的VSCode工程进行启动的请求。

[0127] 对于S34,在获取到所述VSCode工程确定请求时,对所述待处理的VSCode工程进行启动,将完成启动的所述待处理的VSCode工程作为所述待编辑的VSCode工程。

[0128] 在一个实施例中,上述根据所述模块配置文件和所述目标核心模块,对所述待分析的业务模块进行测试,得到业务模块测试结果的步骤,包括:

[0129] S71:根据所述模块配置文件调用所述模块通信模块以使所述待分析的业务模块和所述目标核心模块之间通信;

[0130] S72:获取测试用例集;

[0131] S73:基于所述待分析的业务模块和所述目标核心模块之间的通信,根据所述目标核心模块和所述测试用例集,对所述待分析的业务模块进行测试,得到所述业务模块测试结果。

[0132] 本实施例基于所述待分析的业务模块和所述目标核心模块之间通信,采用所述测试用例集对所述待分析的业务模块进行测试,从而实现了在业务模块开发人员的本地电脑中完成了业务模块的开发和联合测试提供了基础,也有利于使核心模块和业务模块的独立开发、独立发版,最终达到核心模块和业务模块的逻辑互相不影响的效果。

[0133] 对于S71,根据所述模块配置文件调用所述模块通信模块,所述模块通信模块通过所述模块配置文件和所述Vuex状态管理模块,使所述待分析的业务模块和所述目标核心模块之间通信。

[0134] 对于S72,可以获取用户输入的测试用例集,也可以从第三方应用系统中获取测试用例集,还可以从数据库中获取测试用例集。

[0135] 测试用例集中包括一个或多个测试用例。测试用例,是指对一项特定的软件产品进行测试任务的描述,体现测试方案、方法、技术和策略。

[0136] 对于S73,基于所述待分析的业务模块和所述目标核心模块之间的通信,采用所述测试用例集对所述待分析的业务模块进行测试,其中,在测试的过程中,所述待分析的业务模块与所述目标核心模块进行通信,以实现所述待分析的业务模块的功能正常运行;当对测试用例集中的每个测试用例的测试均为通过时,确定所述业务模块测试结果为通过;当对测试用例集中的任一个测试用例的测试为未通过时,确定所述业务模块测试结果为未通过。

[0137] 在一个实施例中,上述当所述业务模块测试结果为通过时,将所述待分析的业务模块确定为目标业务模块的步骤之后,还包括:

[0138] S91:获取业务模块上传请求;

[0139] S92:响应所述业务模块上传请求,根据所述模块配置文件生成所述目标业务模块对应的目标引入配置数据;

[0140] S93:将所述目标核心模块的版本标识、所述目标引入配置数据和所述目标业务模块作为关联数据发送给服务端,其中,所述服务端根据所述目标核心模块的版本标识、各个所述目标引入配置数据和各个所述目标业务模块进行前端应用系统打包,得到目标前端应用系统。

[0141] 本实施例在业务模块开发人员的本地电脑中完成了业务模块的开发和联合测试之后,将所述目标业务模块发送给服务端,为前端应用系统的打包提供了基础;而且根据所述模块配置文件生成所述目标业务模块对应的目标引入配置数据,从而不需手动针对每个所述目标业务模块在服务端进行设置。

[0142] 对于S91,获取用户输入的业务模块上传请求,也可以获取第三方应用系统输入的业务模块上传请求。

[0143] 业务模块上传请求,是将目标业务模块对应的JS文件上传到服务端的请求。

[0144] 对于S92,在获取到所述业务模块上传请求时,基于预设的引入配置数据生成规则,根据所述模块配置文件生成引入配置数据,将生成的引入配置数据作为所述目标业务模块对应的目标引入配置数据。

[0145] 对于S93,将所述目标核心模块的版本标识、所述目标引入配置数据和所述目标业务模块作为关联数据,为灵活的进行前端应用系统打包提供了基础。

[0146] 其中,所述服务端用于获取打包配置数据,根据打包配置数据、所述目标核心模块的版本标识、各个所述目标引入配置数据和各个所述目标业务模块进行前端应用系统打包,将打包得到的前端应用系统作为目标前端应用系统。

[0147] 打包配置数据包括:核心模块版本标识和业务模块版本标识。核心模块版本标识,是版本ID,用于唯一标识一个版本的核心模块。业务模块版本标识包括:模块标识和版本标识;其中,模块标识可以是业务模块名称、业务模块ID等唯一标识一个业务模块的数据;版本标识,是版本ID,用于唯一标识业务模块的一个版本。

[0148] 在一个实施例中,上述根据所述目标核心模块的版本标识、各个所述目标引入配置数据和各个所述目标业务模块进行前端应用系统打包,得到目标前端应用系统的步骤,包括:

[0149] S931:将所述目标业务模块放入业务代码仓库;

[0150] S932:获取应用系统发布请求,所述应用系统发布请求携带有第一版本标识和多个第二版本标识;

[0151] S933:响应所述应用系统发布请求,获取配置脚本;

[0152] S934:执行所述配置脚本,根据所述第一版本标识从核心代码仓库中获取核心模块,得到待处理的核心模块;

[0153] S935:执行所述配置脚本,根据每个所述第二版本标识从所述业务代码仓库中获取业务模块,得到待打包的业务模块;

[0154] S936:执行所述配置脚本,根据每个所述第二版本标识对应的所述目标引入配置数据,对所述待处理的核心模块中的Script标签引入配置参数进行更新,得到待打包的核心模块;

[0155] S937:根据所述待打包的核心模块和各个所述待打包的业务模块进行前端应用系统打包,得到所述目标前端应用系统。

[0156] 本实施例实现了根据所述目标核心模块的版本标识、各个所述目标引入配置数据和各个所述目标业务模块进行前端应用系统打包,从而在实现核心模块和业务模块的独立开发、独立发版之后,根据打包配置数据进行灵活的前端应用系统打包。

[0157] 对于S931,所述服务端将收到的所述目标业务模块放入业务代码仓库。

[0158] 业务代码仓库,用于存放业务模块的JS文件的数据库。

[0159] 对于S932,所述服务端,可以获取用户输入的应用系统发布请求,也可以获取第三方应用系统发送的应用系统发布请求。

[0160] 应用系统发布请求,是进行前端应用系统打包的请求。

[0161] 其中,所述应用系统发布请求携带有打包配置数据,打包配置数据包括:第一版本标识和多个第二版本标识。第一版本标识是核心模块版本标识。第二版本标识是业务模块版本标识。

[0162] 对于S933,通过所述服务端,在获取到所述应用系统发布请求时,可以获取从数据库中配置脚本,也可以从第三方应用系统中获取配置脚本,还可以获取用户输入的配置脚本。

[0163] 配置脚本,可以是采用Java(面向对象编程语言)开发的脚本。

[0164] 对于S934,通过所述服务端执行所述配置脚本,根据所述第一版本标识在核心代码仓库中查找核心模块,将查找到的核心模块作为所述待处理的核心模块。

[0165] 核心代码仓库,用于存放核心代码的数据库。

[0166] 对于S935,通过所述服务端执行所述配置脚本,将所述第二版本标识从所述业务代码仓库中获取业务模块(也就是业务模块开发人员的本地电脑中完成了业务模块的开发和联合测试得到的目标业务模块),将获取的每个业务模块作为一个待打包的业务模块。

[0167] 对于S936,通过所述服务端执行所述配置脚本,根据所述第二版本标识从数据库中获取所述目标引入配置数据,采用获取的各个所述目标引入配置数据,对所述待处理的核心模块中的Script标签引入配置参数进行更新,将完成更新的所述待处理的核心模块作为所述待打包的核心模块。从而在待打包的核心模块中引入了每个所述第二版本标识对应的待打包的业务模块。

[0168] 对于S937,通过所述服务端,对所述待打包的核心模块和各个所述待打包的业务模块进行前端应用系统打包,将打包得到的前端应用系统作为所述目标前端应用系统。

[0169] 参照图2,本申请提出了一种业务模块开发装置,所述装置包括:

[0170] 请求获取模块100,用于获取业务模块开发请求,根据所述业务模块开发请求展示开发者界面;

[0171] 目标核心模块确定模块200,用于根据所述开发者界面启动目标核心模块;

[0172] 待编辑的VSCode工程确定模块300,用于根据所述开发者界面启动VSCode工程,得到待编辑的VSCode工程;

[0173] 模块配置文件获取模块400,用于根据所述开发者界面获取模块配置文件,其中,所述模块配置文件用于表述所述目标核心模块与所述待编辑的VSCode工程之间的通信配置数据;

[0174] 业务模块代码获取模块500,用于在所述开发者界面中,根据所述待编辑的VSCode工程获取业务模块代码;

[0175] 待分析的业务模块获取模块600,用于根据所述业务模块代码进行JS文件打包,得到待分析的业务模块;

[0176] 业务模块测试结果获取模块700,用于根据所述模块配置文件和所述目标核心模块,对所述待分析的业务模块进行测试,得到业务模块测试结果;

[0177] 目标业务模块获取模块800,用于当所述业务模块测试结果为通过时,将所述待分析的业务模块确定为目标业务模块。

[0178] 本实施例首先根据所述业务模块开发请求展示开发者界面,其次根据所述开发者界面启动目标核心模块,根据所述开发者界面启动VSCode工程,得到待编辑的VSCode工程,根据所述开发者界面获取模块配置文件,然后在所述开发者界面中,根据所述待编辑的VSCode工程获取业务模块代码,根据所述业务模块代码进行JS文件打包,得到待分析的业务模块,最后根据所述模块配置文件和所述目标核心模块,对所述待分析的业务模块进行测试,得到业务模块测试结果,当所述业务模块测试结果为通过时,将所述待分析的业务模块确定为目标业务模块,从而使业务模块开发人员只需要关注业务模块的开发,实现了核心模块和业务模块的独立开发、独立发版,最终达到核心模块和业务模块的逻辑互相不影响的效果。

[0179] 在一个实施例中,上述请求获取模块100包括:安装包获取子模块和目标开发工具确定子模块;

[0180] 所述安装包获取子模块,用于获取软件安装包,其中,所述软件安装包包括:VSCode开发工具安装包、Vuex安装包和终端安装包,所述终端安装包包括:模块通信安装包和核心模块安装包;

[0181] 所述目标开发工具确定子模块,用于对所述VSCode开发工具安装包分别进行安装及配置,得到VSCode开发工具,基于所述VSCode开发工具,对所述Vuex安装包分别进行Vuex状态管理模块的安装及配置,得到待处理的开发工具,在所述待处理的开发工具中,根据所述终端安装包进行安装,得到目标开发工具,其中,所述目标开发工具包括:所述VSCode开发工具、所述Vuex状态管理模块、模块通信模块和待处理的核心模块,调用所述目标开发工具,获取所述业务模块开发请求。

[0182] 在一个实施例中,上述目标核心模块确定模块200包括:核心模块启动请求获取子模块和目标核心模块确定子模块;

[0183] 所述核心模块启动请求获取子模块,用于根据所述开发者界面获取核心模块启动请求;

[0184] 所述目标核心模块确定子模块,用于根据所述核心模块启动请求启动所述待处理的核心模块,得到所述目标核心模块。

[0185] 在一个实施例中,上述待编辑的VSCode工程确定模块300包括:VSCode工程新建请求获取子模块、VSCode工程创建子模块和VSCode工程启动子模块;

[0186] 所述VSCode工程新建请求获取子模块,用于根据所述开发者界面获取VSCode工程新建请求;

[0187] 所述VSCode工程创建子模块,用于根据所述VSCode工程新建请求创建VSCode工程,得到待处理的VSCode工程;

[0188] 所述VSCode工程启动子模块,用于根据所述待处理的VSCode工程获取VSCode工程确定请求,根据所述VSCode工程确定请求,对所述待处理的VSCode工程进行启动,得到所述待编辑的VSCode工程。

[0189] 在一个实施例中,上述业务模块测试结果获取模块700包括:通信子模块和测试子模块;

[0190] 所述通信子模块,用于根据所述模块配置文件调用所述模块通信模块以使所述待分析的业务模块和所述目标核心模块之间通信;

[0191] 所述测试子模块,用于获取测试用例集,基于所述待分析的业务模块和所述目标核心模块之间的通信,根据所述目标核心模块和所述测试用例集,对所述待分析的业务模块进行测试,得到所述业务模块测试结果。

[0192] 在一个实施例中,上述当所述业务模块测试结果为通过时,将所述待分析的业务模块确定为目标业务模块的步骤之后,还包括:

[0193] 获取业务模块上传请求;

[0194] 响应所述业务模块上传请求,根据所述模块配置文件生成所述目标业务模块对应的目标引入配置数据;

[0195] 将所述目标核心模块的版本标识、所述目标引入配置数据和所述目标业务模块作为关联数据发送给服务端,其中,所述服务端根据所述目标核心模块的版本标识、各个所述目标引入配置数据和各个所述目标业务模块进行前端应用系统打包,得到目标前端应用系统。

[0196] 在一个实施例中,上述根据所述目标核心模块的版本标识、各个所述目标引入配置数据和各个所述目标业务模块进行前端应用系统打包,得到目标前端应用系统的步骤,包括:

[0197] 将所述目标业务模块放入业务代码仓库;

[0198] 获取应用系统发布请求,所述应用系统发布请求携带有第一版本标识和多个第二版本标识;

[0199] 响应所述应用系统发布请求,获取配置脚本;

[0200] 执行所述配置脚本,根据所述第一版本标识从核心代码仓库中获取核心模块,得到待处理的核心模块;

[0201] 执行所述配置脚本,根据每个所述第二版本标识从所述业务代码仓库中获取业务模块,得到待打包的业务模块;

[0202] 执行所述配置脚本,根据每个所述第二版本标识对应的所述目标引入配置数据,对所述待处理的核心模块中的Script标签引入配置参数进行更新,得到待打包的核心模块;

[0203] 根据所述待打包的核心模块和各个所述待打包的业务模块进行前端应用系统打包,得到所述目标前端应用系统。

[0204] 参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于储存业务模块开发方法等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种业务模块开发方法。所述业务模块开发方法,包括:获取业务模块开发请求,根据所述业务模块开发请求展示开发者界面;根据所述开发者界面启动目标核心模块;根据所述开发者界面启动VSCode工程,得到待编辑的VSCode工程;根据所述开发者界面获取模块配置文件,其中,所述模块配置文件用于表述所述目标核心模块与所述待编辑的VSCode工程之间的通信配置数据;在所述开发者界面中,根据所述待编辑的VSCode工程获取业务模块代码;根据所述业务模块代码进行JS文件打包,得到待分析的业务模块;根据所述模块配置文件和所述目标核心模块,对所述待分析的业务模块进行测试,得到业务模块测试结果;当所述业务模块测试结果为通过时,将所述待分析的业务模块确定为目标业务模块。

[0205] 本实施例首先根据所述业务模块开发请求展示开发者界面,其次根据所述开发者界面启动目标核心模块,根据所述开发者界面启动VSCode工程,得到待编辑的VSCode工程,根据所述开发者界面获取模块配置文件,然后在所述开发者界面中,根据所述待编辑的VSCode工程获取业务模块代码,根据所述业务模块代码进行JS文件打包,得到待分析的业务模块,最后根据所述模块配置文件和所述目标核心模块,对所述待分析的业务模块进行测试,得到业务模块测试结果,当所述业务模块测试结果为通过时,将所述待分析的业务模块确定为目标业务模块,从而使业务模块开发人员只需要关注业务模块的开发,实现了核心模块和业务模块的独立开发、独立发版,最终达到核心模块和业务模块的逻辑互相不影响的效果。

[0206] 本申请一实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现一种业务模块开发方法,包括步骤:获取业务模块开发请求,根据所述业务模块开发请求展示开发者界面;根据所述开发者界面启动目标核心模块;根据所述开发者界面启动VSCode工程,得到待编辑的VSCode工程;根据所述开发者界面获取模块配置文件,其中,所述模块配置文件用于表述所述目标核心模块与所述待编辑的VSCode工程之间的通信配置数据;在所述开发者界面中,根据所述待编辑的VSCode工程获取业务模块代码;根据所述业务模块代码进行JS文件打包,得到待分析的业务模块;根据所述模块配置文件和所述目标核心模块,对所述待分析的业务模块进行测试,得到业务模块测试结果;当所述业务模块测试结果为通过时,将所述待分析的业务模块确定为目标业务模块。

[0207] 上述执行的业务模块开发方法,首先根据所述业务模块开发请求展示开发者界面,其次根据所述开发者界面启动目标核心模块,根据所述开发者界面启动VSCode工程,得到待编辑的VSCode工程,根据所述开发者界面获取模块配置文件,然后在所述开发者界面中,根据所述待编辑的VSCode工程获取业务模块代码,根据所述业务模块代码进行JS文件打包,得到待分析的业务模块,最后根据所述模块配置文件和所述目标核心模块,对所述待分析的业务模块进行测试,得到业务模块测试结果,当所述业务模块测试结果为通过时,将所述待分析的业务模块确定为目标业务模块,从而使业务模块开发人员只需要关注业务模块的开发,实现了核心模块和业务模块的独立开发、独立发版,最终达到核心模块和业务模块的逻辑互相不影响的效果。

[0208] 本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和 / 或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。

[0209] 需要说明的是,在本文中,术语"包括”、"包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句"包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。

[0210] 以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。< / script>

Claims

1. A business module development method, It is characterized in that The method comprises: Obtain a business module development request, and display a developer interface according to the business module development request; Start the target core module according to the developer interface; Start the VSCode project according to the developer interface to obtain the VSCode project to be edited; Obtaining a module configuration file according to the developer interface, wherein the module configuration file is used to express communication configuration data between the target core module and the VSCode project to be edited; In the developer interface, obtain the business module code according to the VSCode project to be edited; Pack the JS file according to the business module code to obtain the business module to be analyzed; According to the module configuration file and the target core module, the business module to be analyzed is tested to obtain a business module test result; When the test result of the business module is passed, the business module to be analyzed is determined as a target business module; The step of obtaining a business module development request includes: Get a software installation package, wherein the software installation package includes: a VSCode development tool installation package, a Vuex installation package and a terminal installation package, and the terminal installation package includes: a module communication installation package and a core module installation package; Install and configure the VSCode development tool installation packages respectively to obtain the VSCode development tool; Based on the VSCode development tool, the Vuex state management module is installed and configured for the Vuex installation package to obtain the development tool to be processed; In the development tool to be processed, the terminal installation package is installed to obtain a target development tool, wherein the target development tool includes: the VSCode development tool, the Vuex state management module, the module communication module and the core module to be processed; Calling the target development tool to obtain the business module development request; The step of starting the target core module according to the developer interface includes: Obtaining a core module startup request according to the developer interface; Start the core module to be processed according to the core module start request to obtain the target core module; After the step of determining the business module to be analyzed as a target business module when the business module test result is passed, the method further includes: Get the business module upload request; In response to the business module upload request, generating target import configuration data corresponding to the target business module according to the module configuration file; The version identifier of the target core module, the target import configuration data and the target business module are sent to the server as associated data, wherein the server packages the front-end application system according to the version identifier of the target core module, each target import configuration data and each target business module to obtain the target front-end application system.

2. The business module development method according to claim 1, It is characterized in that The step of starting the VSCode project according to the developer interface to obtain the VSCode project to be edited includes: Obtain a VSCode project creation request according to the developer interface; Create a VSCode project according to the VSCode project creation request to obtain a VSCode project to be processed; Obtain a VSCode project confirmation request according to the VSCode project to be processed; According to the VSCode project determination request, the VSCode project to be processed is started to obtain the VSCode project to be edited.

3. The business module development method according to claim 1, It is characterized in that The step of testing the business module to be analyzed according to the module configuration file and the target core module to obtain the business module test result includes: Calling the module communication module according to the module configuration file enables communication between the business module to be analyzed and the target core module; Get the test case set; Based on the communication between the business module to be analyzed and the target core module, the business module to be analyzed is tested according to the target core module and the test case set to obtain the business module test result.

4. The business module development method according to claim 1, It is characterized in that The step of packaging the front-end application system according to the version identifier of the target core module, each of the target imported configuration data and each of the target business modules to obtain the target front-end application system comprises: Put the target business module into the business code warehouse; Obtaining an application system publishing request, wherein the application system publishing request carries a first version identifier and multiple second version identifiers; Responding to the application system publishing request, obtaining a configuration script; Execute the configuration script, obtain the core module from the core code repository according to the first version identifier, and obtain the core module to be processed; Execute the configuration script, obtain a business module from the business code repository according to each second version identifier, and obtain a business module to be packaged; Execute the configuration script, import the configuration data corresponding to each second version identifier, update the Script tag import configuration parameters in the core module to be processed, and obtain the core module to be packaged; The front-end application system is packaged according to the core module to be packaged and each of the business modules to be packaged to obtain the target front-end application system.

5. A business module development device, used to execute the method according to any one of claims 1 to 4, It is characterized in that The device comprises: A request acquisition module, used to acquire a business module development request and display a developer interface according to the business module development request; A target core module determination module, used for starting the target core module according to the developer interface; A VSCode project to be edited determining module, used to start the VSCode project according to the developer interface to obtain the VSCode project to be edited; A module configuration file acquisition module, used to acquire a module configuration file according to the developer interface, wherein the module configuration file is used to express the communication configuration data between the target core module and the VSCode project to be edited; A business module code acquisition module, used to acquire the business module code according to the VSCode project to be edited in the developer interface; The business module acquisition module to be analyzed is used to package the JS file according to the business module code to obtain the business module to be analyzed; A business module test result acquisition module is used to test the business module to be analyzed according to the module configuration file and the target core module to obtain a business module test result; The target business module acquisition module is used to determine the business module to be analyzed as a target business module when the test result of the business module is passed.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-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 according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • A front-end development processing method and device based on a basic library, computer equipment and a storage medium

    CN112685023A

  • Modularized software development method and device, electronic equipment and storage medium

    CN112732248A