A development method and device of an application, an electronic device, and a storage medium

By initializing the target development tool and replacing generic components with the target components in web software development, the inefficiency caused by monolithic architecture is solved, enabling more efficient application development and an optimized development process.

CN115202659BActive Publication Date: 2026-02-10北京自如信息科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210900679.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-28
Publication Date
2026-02-10
Estimated Expiration
2042-07-28

AI Technical Summary

Technical Problem

Existing web software development tools suffer from problems such as slow build speed, large code size, slow running speed, and high maintenance costs due to their monolithic architecture. Furthermore, they lack common runtime components, making it difficult to meet complex business needs.

Method used

By initializing the target development tool, the target component corresponding to the general component is obtained, and the general component is replaced with the target component during the compilation process, providing extension and replacement functions and optimizing the development process.

Benefits of technology

It improved application development efficiency, met complex business needs, optimized build speed and code size, and reduced maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115202659B_ABST
    Figure CN115202659B_ABST
Patent Text Reader

Abstract

The application discloses a kind of application development method, device, electronic equipment and storage medium, method includes: initialization target development tool, to determine initial application, initial application includes general component;With the target component corresponding to general component is obtained;Initial application is compiled, to replace general component with target component determines target application.This method uses target tool to develop, and provides general component, can be based on demand to extend and replace general component, to optimize development process, improve the development efficiency of application.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of software development, and in particular to a development method and device of an application, an electronic device and a storage medium. BACKGROUND

[0002] The mainstream products of Web software development include bit.dev, icestark, etc., and a Web software project usually adopts a monolithic architecture. The monolithic architecture is a design style of packaging all functions in a container for running, and all functions of a system are integrated in an instance. With the increasing complexity of a background system, a single application may not be able to meet the business requirements in this case, and problems such as slow construction speed, large code size, slow running speed, high maintenance cost, etc. may easily occur. In the existing development tools, there may be no or a small amount of general components provided in the runtime, and relevant personnel cannot use the required general components or services according to actual requirements, which brings many inconveniences to the development of the application. SUMMARY

[0003] Therefore, the embodiments of the present application provide a development method and device of an application, an electronic device and a storage medium, to optimize the development process of the application.

[0004] According to a first aspect, the embodiments of the present application provide a development method of an application, comprising:

[0005] initializing a target development tool to determine an initial application, the initial application comprising a general component;

[0006] obtaining a target component corresponding to the general component;

[0007] compiling the initial application to replace the general component with the target component to determine a target application.

[0008] The development method of the application provided by the embodiments can replace the general component with the target component when compiling the initial application, so that the initial application can use the required general service during running. The development method provided by the embodiments uses the target tool for development and provides the general component, which can be extended and replaced based on requirements, so that the development process is optimized, and the development efficiency of the application is improved.

[0009] In combination with the first aspect, in an implementation manner, the obtaining of the target component corresponding to the general component comprises:

[0010] obtaining the target component, which is stored in a root directory of the initial application;

[0011] The general component is replaced with the target component based on the addition operation of the target component's configuration file.

[0012] In conjunction with the first aspect, in one implementation, the step of replacing the generic component with the target component based on the addition operation of the target component's configuration file includes:

[0013] In response to the addition of a configuration file to the target component, the source code path of the target component and the name of the generic component are determined in the configuration file, which is stored in the root directory of the initial application.

[0014] In conjunction with the first aspect, in one implementation, compiling the initial application to replace the generic component with the target component to determine the target application includes:

[0015] In response to the application compilation instructions, the initial application is compiled to replace the general components with the target components and generate a compilation result.

[0016] In conjunction with the first aspect, in one implementation, replacing the general component with the target component includes:

[0017] The configuration file of the target component is parsed to obtain the source code path of the target component and the name of the general component;

[0018] Based on the source code path of the target component and the name of the general component, the general component is replaced with the target component.

[0019] In conjunction with the first aspect, in one embodiment, the method further includes:

[0020] Obtain the compilation result of the initial application, which is located on the target server;

[0021] Based on the loading instructions for the compiled results, the application is rendered and laid out.

[0022] In conjunction with the first aspect, in one implementation, rendering and laying out the application based on the loading instructions for the compilation result includes:

[0023] The compilation result is rendered to obtain a rendered page;

[0024] In response to a movement operation of a preset descriptive object in the rendered page, the page layout of the target application is determined.

[0025] According to a second aspect, embodiments of the present invention provide an application development apparatus, the apparatus comprising:

[0026] An initialization module is used to initialize the target development tool to determine the initial application, which includes common components;

[0027] The component acquisition module is used to acquire the target component corresponding to the general component;

[0028] A compilation module is used to compile the initial application to replace the general components with the target components to determine the target application.

[0029] In conjunction with the second aspect, in one implementation, the component acquisition module includes:

[0030] The code retrieves a sub-unit, used to retrieve the target component, which is stored in the root directory of the initial application;

[0031] The configuration adds a subunit for replacing the general component with the target component based on the addition operation of the configuration file of the target component.

[0032] In conjunction with the second aspect, in one implementation, the configuration adding subunit is further used for:

[0033] In response to the addition of a configuration file to the target component, the source code path of the target component and the name of the generic component are determined in the configuration file, which is stored in the root directory of the initial application.

[0034] In conjunction with the second aspect, in one implementation, the compilation module further includes:

[0035] The compilation subunit is used to compile the initial application in response to application compilation instructions, to replace the general components with the target components, and to generate compilation results.

[0036] In conjunction with the second aspect, in one implementation, the compilation subunit further includes:

[0037] The configuration file of the target component is parsed to obtain the source code path of the target component and the name of the general component; based on the source code path of the target component and the name of the general component, the general component is replaced with the target component.

[0038] In conjunction with the second aspect, in one embodiment, the device further includes:

[0039] The result acquisition module is used to acquire the compilation result of the initial application, which is located on the target server.

[0040] The rendering and layout module is used to render and lay out the application based on the loading instructions of the compilation results.

[0041] In conjunction with the second aspect, in one implementation, the rendering layout module further includes:

[0042] The rendering subunit is used to render the compilation result to obtain a rendered page;

[0043] The layout subunit is used to determine the page layout of the target application in response to a movement operation of a preset descriptive object in the rendered page.

[0044] According to a third aspect, embodiments of the present invention provide an electronic device, including: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the application development method described in the first aspect or any embodiment of the first aspect.

[0045] According to a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer instructions for causing the computer to perform the application development method described in the first aspect or any embodiment of the first aspect. Attached Figure Description

[0046] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0047] Figure 1 This is a flowchart of an application development method according to an embodiment of the present invention;

[0048] Figure 2 This is a flowchart of a method for obtaining a target component according to an embodiment of the present invention;

[0049] Figure 3 This is a flowchart of an application development method according to an embodiment of the present invention;

[0050] Figure 4 This is a schematic diagram of an application development method according to an embodiment of the present invention;

[0051] Figure 5 This is a schematic diagram of an application development apparatus according to an embodiment of the present invention;

[0052] Figure 6 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0054] According to an embodiment of the present invention, an embodiment of an application development method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0055] This embodiment provides a method for developing an application that can be used on terminals such as computers, mobile phones, and tablets. Figure 1 This is a flowchart of an application development method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:

[0056] S11, Initialize the target development tools to determine the initial application.

[0057] Target Development Tools are scaffolding tools used for front-end development. Before developing an application, the development environment needs to be configured and initialized. Target Development Tools can be deployed in npm (Node.js package manager). Users can pre-configure a .npmrc file in the root directory of their initial application, and then use the npm command to install Target Development Tools globally. After installation, the command is registered globally, and a test command is used to verify successful installation. After initializing Target Development Tools, the application initialization command is entered in the command line to initialize the application code locally. The application can be a website or a mobile app. After initialization, application-related information can be filled in the configuration file in the root directory of the initial application. This information can include the application name, application type, hosting type, entry file, horizontal width unit, and column width unit.

[0058] Project dependencies can be installed by executing the installation command in the root directory of the initial application, and the development service can be started by executing the start command.

[0059] Common components are designed for developers and are tools or services abstracted from the development process. Target development tools include these common components by default. When developing an application using the target development tool, the application can select these common components; that is, the initial application includes common components.

[0060] S12, obtain the target component corresponding to the general component.

[0061] A target development tool may contain multiple generic components. In actual use, some generic components may fail to meet the application's runtime requirements. Therefore, existing generic components can be extended or replaced. For example, a generic component might be a logging service offering four logging types. However, if these four types do not meet the application's development needs, it can be extended to obtain the target component, i.e., the extended logging service. The target component and its corresponding configuration file are stored in the root directory of the initial application. The configuration file can contain the target component's name, type, managed type, entry file, path, and the name of the generic component. This allows the generic component to be replaced with the target component during compilation using the information in the configuration file.

[0062] S13, compile the initial application to replace the generic components with the target components to determine the target application.

[0063] The initial application can be compiled by executing the compilation instructions entered by the developer. During the compilation process, the configuration files of the target components can be parsed to replace common components with the target components, i.e., compiling the target components so that the target application can use them. The build process can also be intervened during compilation, such as code pre-compilation and file cleanup. Code pre-compilation can use other compilation tools to scan, transform, and generate code files, update and install dependencies. File cleanup can involve removing unnecessary code files, downloading new code and resource files, etc.

[0064] The application development method provided in this embodiment initializes the target tool and the initial application to obtain the target component. When compiling the initial application, the general component can be replaced with the target component so that the general service required by the initial application can be used at runtime. The development method provided in this embodiment uses the target tool for development and provides the general component. The general component can be extended and replaced according to the requirements, thereby optimizing the development process and improving the development efficiency of the application.

[0065] This embodiment provides a method for obtaining the target component, corresponding to Figure 1 S12 in Figure 2 This is a flowchart of a method for obtaining a target component according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0066] S21, Obtain the target component.

[0067] To replace a generic component with a target component, after completing the code for the target component, store the target component in the root directory of the initial application.

[0068] S22, based on the addition operation of the target component's configuration file, replace the generic component with the target component.

[0069] Specifically, in response to the addition of a configuration file to the target component, the source code path of the target component and the name of the general component are specified in the configuration file, which is stored in the root directory of the initial application.

[0070] The configuration file can include information about the target component, such as the target component's name, type, management type, path to the target component, and the name of the generic component to be replaced.

[0071] For example, a common component is a logging service named Logger. We need to extend one of the logging types of this service. After completing the extension, we obtain the target component's code file, named SelfLogger, named SelfLogger.ts. Place SelfLogger.ts in the initial application's src / components / Logger directory, and add a configuration file, configuration.json, to the same directory. In the configuration file, specify the target component's name as SelfLogger, type as service, hosting type as local, reference (entry file) as . / SelfLogger.js, and runtime (specifying the runtime service) as Logger. The entry file content corresponds to the target component's file path, and the runtime service is specified as the name of the common component. This allows us to replace the common component during the compilation phase and compile the target component.

[0072] In one implementation, corresponding to Figure 1 S13 in the process of compiling the initial application to replace the common components with the target components and determining the target application includes: in response to the application compilation instructions, compiling the initial application to replace the common components with the target components and generating the compilation results.

[0073] The process of executing application compilation instructions compiles the initial application, building the compiled results from the initial application's root directory into the `dist` folder. The compilation phase includes a startup phase and a development tool execution phase. The startup phase includes steps from executing the application compilation instructions to executing the application's own technology stack development tools. The development tool execution phase includes, for example, executing the `vue-cli-service build` command on the project. The startup phase also includes intervention in the build process, which can include code pre-compilation and file cleanup. Code pre-compilation involves scanning, transforming, and generating code files, updating and installing dependencies, such as updating monitoring code. File cleanup can remove unnecessary code files, download new code or resource files. Intervention in the development tool execution phase involves collecting parameters submitted by the user during the startup phase, combining built-in default parameters, and uploading them to the development tool.

[0074] During the compilation of the initial application, the configuration files of the target components in the root directory of the initial application are parsed to determine the common components that need to be replaced, and the compilation of the target components is completed, thus completing the replacement of the common components.

[0075] Specifically, it includes the following steps:

[0076] (1) Parse the configuration file of the target component to obtain the source code path of the target component and the name of the general component.

[0077] The application compilation command is executed, and the entire initial application folder is scanned to find all configuration files, namely configuration.json. The fields contained in the configuration file are parsed to find the service to be replaced specified by the runtime field and the path of the replacement service specified by the reference field. The service to be replaced is the name of the general component to be replaced, and the path of the replacement service is the path of the target component.

[0078] (2) Replace the target component with the target component based on the source code path of the target component and the name of the general component.

[0079] Replace the path of the generic component to be replaced with the path of the target component to complete the replacement of the generic component.

[0080] Since the development tools may lack or contain only a few components, the development tools of this application not only provide general components, but also allow for the extension and replacement of general components as needed.

[0081] This embodiment provides an application development method. Figure 3 This is a flowchart of an application development method according to an embodiment of the present invention, such as... Figure 3As shown, the process includes the following steps:

[0082] S31, obtain the compilation results of the initial application.

[0083] After compiling the initial application and obtaining the compilation results, enter the upload command in the command-line tool to submit the compilation results in the dist folder of the compilation stage to the specified file server. That is, the compilation results are located on the target server. When it is necessary to load the build results for rendering and layout, the compilation results can be retrieved from the specified file server.

[0084] S32 renders and lays out the application based on the loading instructions of the compilation results.

[0085] Executing the loading command allows you to remotely load the compilation results and perform rendering and layout based on your needs.

[0086] Specifically, it includes the following steps:

[0087] (1) Render the compilation results to obtain the rendered page.

[0088] (2) In response to the movement operation of the preset description object in the rendered page, determine the page layout of the target application.

[0089] The compiled result of the rendering is a rendered page. The default description objects are the modules in the rendered page. These modules can be moved, and their position and order on the page can be determined by dragging and dropping, which determines the page layout of the target application.

[0090] This embodiment provides a method for developing an application, such as... Figure 4 As shown, first configure the development environment and install the development tools provided in this application. After installation, register the command `zcloud` globally. You can test the installation success using `zcloud-version`. Since the application template may be hosted on a Git version control system, you also need to obtain permissions to the code repository where the application template is located beforehand. Initialize the application from the template repository by executing `zcloud init-template` in the command line. <name>Initialize the application code locally. After the initialization of the application code is completed, the configuration file of the application can be found in the root directory of the application, for example, configuration.json in src / components / card-demoA, fill in the following fields: name (application name), type (application type), collocation (hosting type), reference (entry file), columnWidth (horizontal width unit), rowWidth (column width unit). After filling in, install the project dependencies in the root directory of the application, which refers to the dependencies used by the application code, here refers to the runtime dependencies and development dependencies explicitly declared in package.json. Execute the npm intall instruction to install these declared dependencies locally, and then start the development service.

[0091] The general components and services of the development tool can be replaced according to needs, which can include data request tools, log tools, business tools, inter-application communication tools, etc. required by the application runtime. When replacement is needed, a folder with any name can be created in the root directory of the application, the configuration file of the target component is added in the folder, and the name (application name), type (application type), collocation (hosting type), reference (entry file), runtime (specify runtime service) are filled in the configuration file. Take replacing the general component Logger as an example, the target component is SelfLogger, after completing the SelfLogger.ts file, it is placed in the src / components / Logger directory of the application directory, and the configuration file corresponding to the target component configuration.json is added under the same directory. SelfLogger will be read and replaced by the corresponding service in the development tool in the compilation stage, and the developer is unaware of the introduction and use of Logger, and the corresponding service in the development tool is abstracted through the facade of Logger and converted at the source code level through AST (Abstract Syntax Tree) tool in the compilation stage. During compilation, the configuration file of the target component can be scanned and information processed through the specified plug-in in the development tool, the name of the general component corresponding to the runtime field and the path of the target component corresponding to the reference are found out, and the path is replaced in the reference path of the configuration file of the general component. In this replacement process, node traversal, node judgment and code generation of AST abstract syntax tree are included.

[0092] After the replacement of the common components is completed, a compilation instruction is executed on the command line, such as zcloud deploy-component[application name]-env[environment parameter configuration file name], to build the application in the src folder into the dist folder. The code compilation and building process includes a startup phase and a development tool execution phase. In the startup phase, steps before the execution of the application compilation instruction to the execution of the development tools of the application technology stack itself are included. In the development tool execution phase, a build command such as vue-cli-service build is executed on the project. The startup phase also includes intervention on the building process, which can include code pre-compilation and file arrangement. Code pre-compilation is scanning, converting and generating, updating and installing dependencies on code files in the startup phase, such as updating the code for monitoring. File arrangement can remove unnecessary code files, download new code or resource files. Intervention on the development tool execution phase refers to collecting parameters submitted by the user in the startup phase, combining built-in default parameters and uploading to the development tool.

[0093] After the compilation is completed, the compilation result can be submitted to the target server by executing an upload instruction zcloud upload. The upload instruction will execute a local specific execution script file, such as the built-in upload.py script. The script submits the compilation result to the target server and returns the storage address. The compilation result can also be built into a Docker image and pushed to the original remote server and deployed to a K8S (Kubernetes, orchestration management tool) cluster.

[0094] The compilation result uploaded to the target server can be loaded through an online editor, which is completed by the application loader in the development tool provided by the present application. After the compilation result is obtained, a rendering process is executed, and a layout tool is used to arrange a plurality of rendering results on the page at appropriate positions, thereby completing the development of the application.

[0095] The embodiment provides a scaffolding development tool. The development tool provides common components, and can replace and extend the common components according to requirements. The storage scheme of the application code generation result can be realized through an upload instruction, and the submission result can be submitted to various version control systems or file storage systems. The compilation result is integrated into the base station application through an application loader and a grid layout scheme, and intervention on the compilation result and process is supported in the compilation process. The application development method optimizes the development process and improves the development efficiency of the application.

[0096] An application development device is also provided in the embodiments, which is used to implement the above embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, implementation of hardware, or a combination of software and hardware, is also possible and contemplated.

[0097] The embodiments provide an application development device, as shown in Figure 5 comprises:

[0098] An initialization module is configured to initialize a target development tool to determine an initial application, wherein the initial application comprises a general component;

[0099] A component acquisition module is configured to acquire a target component corresponding to the general component;

[0100] A compiling module is configured to compile the initial application to replace the general component with the target component to determine a target application.

[0101] In an embodiment, the component acquisition module comprises:

[0102] A code acquisition subunit is configured to acquire a target component, wherein the target component is stored in a root directory of the initial application;

[0103] A configuration adding subunit is configured to replace the general component with the target component based on an adding operation on a configuration file of the target component.

[0104] In an embodiment, the configuration adding subunit is further configured to:

[0105] In response to the adding operation on the configuration file of the target component, determine a source code path of the target component and a name of the general component in the configuration file, wherein the configuration file is stored in the root directory of the initial application.

[0106] In an embodiment, the compiling module further comprises:

[0107] A compiling subunit is configured to compile the initial application to replace the general component with the target component and generate a compiling result in response to an application compiling instruction.

[0108] In an embodiment, the compiling subunit further comprises:

[0109] configured to parse a configuration file of the target component to acquire a source code path of the target component and a name of the general component, and replace the general component with the target component according to the source code path of the target component and the name of the general component.

[0110] In one embodiment, the device further includes:

[0111] The result acquisition module is used to acquire the compilation result of the initial application, which is located on the target server.

[0112] The rendering and layout module is used to render and lay out the application based on the loading instructions of the compilation results.

[0113] In one implementation, the rendering layout module further includes:

[0114] The rendering subunit is used to render the compilation result to obtain a rendered page;

[0115] The layout subunit is used to determine the page layout of the target application in response to a movement operation of a preset descriptive object in the rendered page.

[0116] The application development apparatus in this embodiment is presented in the form of functional units, where a unit refers to an ASIC circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0117] Further functional descriptions of the above modules are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0118] This invention also provides an electronic device having the above-described features. Figure 5 The application development apparatus shown.

[0119] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of the present invention, such as... Figure 6 As shown, the terminal may include: at least one processor 601, such as a CPU (Central Processing Unit), at least one communication interface 603, a memory 604, and at least one communication bus 602. The communication bus 602 is used to enable communication between these components. The communication interface 603 may include a display screen and a keyboard; optionally, the communication interface 603 may also include a standard wired interface or a wireless interface. The memory 604 may be high-speed RAM (Random Access Memory) or non-volatile memory, such as at least one disk storage device. Optionally, the memory 604 may also be at least one storage device located remotely from the aforementioned processor 601. The processor 601 may be combined with... Figure 5 The described apparatus, the application stored in the memory 604, and the processor 601 invokes the program code stored in the memory 604 for executing any of the above method steps.

[0120] The communication bus 602 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 602 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the figure to represent the communication bus 602, but it does not mean that there is only one bus or only one type of bus.

[0121] The memory 604 can include a volatile memory (e.g., a random-access memory, RAM), a non-volatile memory (e.g., a flash memory, a hard disk drive, or a solid-state drive), or a combination of the above types of memories.

[0122] The processor 601 can be a central processing unit (CPU), a network processor (NP), or a combination of the CPU and the NP.

[0123] The processor 601 can further include a hardware chip. The hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0124] Optionally, the memory 604 is further configured to store program instructions. The processor 601 can invoke the program instructions to implement the application development method as shown in the embodiments of the present application.

[0125] The embodiments of the present application further provide a non-transitory computer storage medium, which stores computer executable instructions. The computer executable instructions can execute the application development method in any method embodiment described above. The storage medium can be a disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory, a Hard Disk Drive (HDD) or a Solid-State Drive (SSD), etc. The storage medium can also include a combination of the above-mentioned storage media.

[0126] Although the embodiments of the present application are described in conjunction with the drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes are intended to fall within the scope of the appended claims.< / name>

Claims

1. A method for developing an application, characterized in that, include: Initialize the target development tools to determine the initial application. The initial application includes common components, which are tools or services abstracted during the development process. The common components include data request tools, logging tools, business tools, and inter-application communication tools required for application runtime. Obtain the target component corresponding to the general component; The initial application is compiled to replace the general component with the target component to determine the target application, including: parsing the configuration file of the target component during the compilation process to replace the general component with the target component.

2. The method according to claim 1, characterized in that, The step of obtaining the target component corresponding to the general component includes: Obtain the target component, which is stored in the root directory of the initial application; The general component is replaced with the target component based on the addition operation of the configuration file of the target component.

3. The method according to claim 2, characterized in that, The step of adding a configuration file to the target component to replace the generic component includes: In response to the addition of a configuration file to the target component, the source code path of the target component and the name of the generic component are determined in the configuration file, which is stored in the root directory of the initial application.

4. The method according to claim 1, characterized in that, The step of compiling the initial application to replace the generic components with the target components to determine the target application includes: In response to the application compilation instructions, the initial application is compiled to replace the general component with the target component and generate a compilation result.

5. The method according to claim 4, characterized in that, The step of replacing the general component with the target component includes: The configuration file of the target component is parsed to obtain the source code path of the target component and the name of the general component; Based on the source code path of the target component and the name of the general component, the general component is replaced with the target component.

6. The method according to claim 1, characterized in that, The method further includes: Obtain the compilation result of the initial application, which is located on the target server; Based on the loading instructions for the compiled results, the application is rendered and laid out.

7. The method according to claim 6, characterized in that, The rendering and layout of the application based on the loading instructions of the compilation result includes: The compilation result is rendered to obtain a rendered page; In response to a movement operation of a preset descriptive object in the rendered page, the page layout of the target application is determined.

8. An application development apparatus, characterized in that, The device includes: An initialization module is used to initialize the target development tool to determine the initial application. The initial application includes common components, which are tools or services abstracted during the development process. The common components include data request tools, logging tools, business tools, and inter-application communication tools required for application runtime. The component acquisition module is used to acquire the target component corresponding to the general component; A compilation module is used to compile the initial application to replace the general component with the target component to determine the target application, including: parsing the configuration file of the target component during the compilation process to replace the general component with the target component.

9. An electronic device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the application development method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the development method of the application according to any one of claims 1-7.

Citation Information

Patent Citations

  • Dynamic update of an application in compilation and deployment

    WO2017087801A1

  • Application program development and deployment method and apparatus, and computer readable medium

    WO2021035553A1