CN109582347B - Method and device for acquiring front-end codes - Google Patents

Method and device for acquiring front-end codes Download PDF

Info

Publication number
CN109582347B
CN109582347B CN201811196769.XA CN201811196769A CN109582347B CN 109582347 B CN109582347 B CN 109582347B CN 201811196769 A CN201811196769 A CN 201811196769A CN 109582347 B CN109582347 B CN 109582347B
Authority
CN
China
Prior art keywords
service module
target
version
module
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811196769.XA
Other languages
Chinese (zh)
Other versions
CN109582347A (en
Inventor
崔航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811196769.XA priority Critical patent/CN109582347B/en
Publication of CN109582347A publication Critical patent/CN109582347A/en
Application granted granted Critical
Publication of CN109582347B publication Critical patent/CN109582347B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The invention discloses a method and a device for acquiring a front-end code, relates to the technical field of computers, and aims to solve the problem that the front-end code is difficult to maintain in the prior art. The method mainly comprises the following steps: dividing the front end code of the application program into at least one service module according to the system function; uploading a service code corresponding to the service module, and generating a service module name, a service module version number and configuration information corresponding to the service module; configuring a configuration file of a target version application program, wherein the configuration file comprises a target service module name and a target service module version number of a target service module referenced by the target version application program; and acquiring the front end code of the target version application program according to the configuration file and the configuration information corresponding to the target service module so as to maintain the target version application program. The invention is applied to the development and maintenance process of the application program.

Description

Method and device for acquiring front-end codes
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for acquiring a front end code.
Background
In the development process of the application program, an own component library is usually developed, and the service functions of the upper layer are all developed based on the component library. The service function can be divided into a plurality of modules, and the dividing method is generally independent to form a service closed loop and does not depend on other functional modules.
When an application has multiple versions to maintain, problems with code management confusion can occur. For example, an application has 2 modules, module a and module B, which in turn rely on the base component library C to implement their respective functions. In version 2.0 of the application, what is needed is version 1.0 of module A, version 2.0 of module B, version 1.0 of base component library C; in version 3.0 of the application, what is needed is version 2.0 of module a, version 3.0 of module B, and version 2.0 of base component library C.
If multiple versions of an application are maintained simultaneously, the need to face such complex, even more complex, version combinations can cause significant confusion to the developer. That is, all functional modules of the same system in the current-stage code management are concentrated in one project, when some business modules are not needed in a specific version, only new branches are pulled through the whole system to solve the problem, when the number of optional modules is increased, the number of branches is exponentially increased, and the code is difficult to maintain.
Disclosure of Invention
In view of this, the present invention provides a method and apparatus for obtaining a front end code, which mainly aims to solve the problem that the front end code is difficult to maintain in the prior art.
According to one aspect of the present invention, there is provided a method of acquiring a front end code, including:
dividing the front end code of the application program into at least one service module according to the system function;
uploading a service code corresponding to the service module, and generating a service module name, a service module version number and configuration information corresponding to the service module, wherein the configuration information refers to a dependent service module name and a dependent service module version number except the service module, which are relied when the service module realizes a corresponding system function;
configuring a configuration file of a target version application program, wherein the configuration file comprises a target service module name and a target service module version number of a target service module referenced by the target version application program;
and acquiring the front end code of the target version application program according to the configuration file and the configuration information corresponding to the target service module so as to maintain the target version application program.
According to one aspect of the present invention, there is provided an apparatus for acquiring a front end code, including:
the dividing unit is used for dividing the front end code of the application program into at least one service module according to the system function;
the generating unit is used for uploading the service codes corresponding to the service modules and generating service module names, service module version numbers and configuration information corresponding to the service modules, wherein the configuration information refers to the service module names and the service module version numbers which are depended on when the service modules realize the corresponding system functions except the service modules;
the configuration unit is used for configuring a configuration file of the target version application program, wherein the configuration file comprises a target service module name and a target service module version number of a target service module referenced by the target version application program;
and the acquisition unit is used for acquiring the front end code of the target version application program according to the configuration file and the configuration information corresponding to the target service module so as to maintain the target version application program.
According to still another aspect of the present invention, there is provided a storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the above-described method of acquiring front end code.
According to still another aspect of the present invention, there is provided a terminal including: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the method for acquiring the front-end code.
By means of the technical scheme, the technical scheme provided by the embodiment of the invention has at least the following advantages:
the invention provides a method and a device for acquiring a front end code, which firstly divide the front end code of an application program into at least one service module according to the system function, then upload the service code corresponding to the service module, generate a service module name, a service module version number and configuration information corresponding to the service module, reconfigure a configuration file of a target version application program, and finally acquire the front end code of the target version application program according to the configuration file and the configuration information corresponding to the target service module. Compared with the prior art, the embodiment of the invention reflects the association relationship between the service modules by the service module name and the service module version number of the service module in the configuration information through the configuration information of the service modules so as to be convenient for unified management and maintenance. Compared with the prior art, the embodiment of the invention obtains the front-end code corresponding to the target version application program through the configuration file of the target version application program, and realizes the management and maintenance of the front-end code of the specific version application program.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a flowchart of a method for acquiring a front end code according to a first embodiment of the present invention;
FIG. 2 is a flowchart of another method for acquiring a front end code according to a second embodiment of the present invention;
FIG. 3 is a block diagram of an apparatus for acquiring front end codes according to a third embodiment of the present invention;
FIG. 4 is a block diagram of another apparatus for acquiring front end codes according to a fourth embodiment of the present invention;
fig. 5 shows a schematic structural diagram of a terminal according to a sixth embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The written front-end code is transmitted to a common terminal, which may be a computer or a server, for better maintenance of the front-end code. The embodiment of the invention provides a method for acquiring a front-end code, as shown in fig. 1, the method comprises the following steps:
101. the front end code of the application is divided into at least one business module according to the system function.
An application program, which is a computer program that operates in a user mode to interact with a user and has a visual user interface for performing a particular task or tasks. The front-end code refers to program code required for an application program to display a user interface and interact with a user, and is part of the application program. The system functions refer to functions that an application program can exhibit or can respond to user operations, for example, a music playing program, including system functions that display lyrics, song names, singers, and the like, and also include system functions that play a next time, pause playing, increase playing volume, and the like in response to user operations. The front end code of the application program is divided into at least one service module according to the different functions of the application program system. The service modules are in one-to-one correspondence with the system functions, and in the embodiment of the invention, the division mode of the service modules is not limited.
In the embodiment of the invention, the technical base component is not divided separately for describing the technical scheme more simply, and is regarded as a service module. The technical basic components comprise: the system comprises a basic component module, a user login judging logic module, a user exit judging logic module and the like. The application program at least needs to form basic system functions by the technical basic component, and the technical basic component is regarded as a service module in the application, so that the front-end code at least comprises the service module.
102. Uploading service codes corresponding to the service modules, and generating service module names, service module version numbers and configuration information corresponding to the service modules.
The service code is a program code for realizing the service module, and when the service code is uploaded, the service module name and the service module version number are generated, and the service module version number is increased along with the increase of the number of times of uploading the service code. The configuration information of the service module refers to the name of the dependent service module and the version number of the dependent service module except the service module, which are relied on when the service module realizes the corresponding system function. The actual content of the configuration information is contained in the service code, and is identified in the service code by calling a function, transferring a function and the like. Searching the configuration information identification in the service code, and generating the identification information into configuration information.
103. A configuration file for the target version application is configured.
With the continuous running of the application program, the running bug of the application program needs to be continuously repaired, and the function of the application program needs to be continuously updated, so that the repair or update of the application program can be recorded in a new version. In order to meet the different needs of the user, each version of the application needs maintenance, so the target version of the application is a specific version of all versions of the application. The configuration file includes a target business module name and a target business module version number of the target business module referenced by the target version application. The target service modules belong to the service modules, the number of the target service modules is at least 1, and the target service modules are determined by the names of the target service modules and the version numbers of the target service modules.
104. And acquiring the front end code of the target version application program according to the configuration file and the configuration information corresponding to the target service module so as to maintain the target version application program.
The configuration file is written with the target service module required by the target version application program, and the configuration information is written with the dependent service module name and the dependent service module version number of the target service module, so that the front end code of the target version application program in the service code can be searched. The front-end code is modified, compiled, tested, and published to maintain the target version application.
The invention provides a method for obtaining front end codes, which comprises the steps of firstly dividing the front end codes of application programs into at least one service module according to system functions, uploading the service codes corresponding to the service modules, generating service module names, service module version numbers and configuration information corresponding to the service modules, then configuring configuration files of target version application programs, and finally obtaining the front end codes of the target version application programs according to the configuration files and the configuration information corresponding to the target service modules. Compared with the prior art, the embodiment of the invention reflects the association relationship between the service modules by the service module name and the service module version number of the service module in the configuration information through the configuration information of the service modules so as to be convenient for unified management and maintenance. Compared with the prior art, the embodiment of the invention obtains the front-end code corresponding to the target version application program through the configuration file of the target version application program, and realizes the management and maintenance of the front-end code of the specific version application program.
The embodiment of the invention provides another method for acquiring front-end codes, as shown in fig. 2, the method comprises the following steps:
201. the front end code of the application is divided into at least one business module according to the system function.
An application program can implement a plurality of system functions, so that the front-end code can be divided into a plurality of service modules according to the system functions. In the case of applications with particularly little functionality, there may be a situation where there is only one business module. In the process of actually writing an application program, html, css, javascript, html5, css3, jQuery, ajax, bootstrap or Backbone and other languages may be used to write the front-end code, and in the embodiment of the present invention, the language used by the front-end code is not limited.
202. Uploading service codes corresponding to the service modules, and generating service module names, service module version numbers and configuration information corresponding to the service modules.
The service codes are part or all of front-end codes, and the service codes are in one-to-one correspondence with the service modules. The configuration information of the service module refers to the name of the dependent service module and the version number of the dependent service module except the service module, which are relied on when the service module realizes the corresponding system function. The configuration information may not include a dependent module, but may include a plurality of dependent modules. For example, the front end codes are divided into a service module a, a service module B and a service module C, where the service module a is implemented depending on the service module B and the service module C, and then both the service module B and the service module C are the names of the dependent service modules in the configuration information of the service module a, and the version numbers of the service module B and the service module C are the version numbers of the dependent service modules in the configuration information of the service module a. That is to say, depending on the service module name, which is one or more of the service module names, the role of the service module is defined by "dependence".
203. A configuration file for the target version application is configured.
The configuration file includes a target business module name and a target business module version number of the target business module referenced by the target version application. The configuration file is the basis for obtaining the target version application code. The configuration file is related to the target version of the application and also to whether the client installs the application and the version of the application.
Specifically, the configuration file for configuring the target version application program includes: judging whether the target version application program is a first installation version or not; if the judgment result is yes, configuring all service module names and corresponding version numbers required by the target version application program as configuration files; if the judgment result is negative, configuring the configuration file of the application program of the target version according to the version of the installed application program. When judging whether the version is the first installed version, the method for judging whether the version is the first installed version can be judged by checking the application program installed on the client, can be judged by checking the file in a specific format which can be stored by the application program, can also be judged by checking the log of the client, and is not limited in the embodiment of the invention. If the client is installed for the first time, the application program of the target version comprises all service module names and corresponding version numbers. If not, the configuration file only comprises the service module name and the corresponding version number of the updated part. Since the target version of the application program is not necessarily the same as the version of the service module contained in the application program, the service module in the application program of the target version needs to record the module name and the corresponding version number.
Specifically, according to the version of the installed application program, configuring the configuration file of the application program of the target version includes: detecting an installed application program version, and comparing the installed application program version with the updated service module name and the updated service module version number of the target version application program; and configuring the update service module name and the update service module version number into a configuration file.
And acquiring a module list of the service modules in the detected installed application program version, and acquiring an updated module list of the service modules in the target version. Based on the updated module list, judging whether the service module and the version number corresponding to the service module in the updated module list are contained in the module list, if not, determining that the service module and the version number corresponding to the service module are updated service modules and updated service module version numbers, and if so, continuing whether the next service module and the version number corresponding to the next service module are contained in the module list until all the service modules in the updated module list are judged. And after judging, acquiring all the names and version numbers of the updating service modules. And the person configures the name of the update service module and the version number of the update service module into a configuration file.
204. Traversing the target service modules corresponding to the version numbers of the target modules in the configuration file according to the preset sequence, and searching the dependent service modules of the target service modules.
The preset sequence may be a serial number sequence of the service module, a service code uploading sequence of the service module, or an arrangement sequence of first letters of names of the service module, and in the embodiment of the present invention, the arrangement mode of the preset sequence is not limited. Traversing and searching according to a preset sequence, and depending service modules in the target service modules. The target service module refers to a service module included in the target version application program.
The method for searching the dependent service module of the target service module specifically comprises the following steps: acquiring a dependent service module name and a dependent service module version number in target configuration information corresponding to a target service module; searching a dependent service module version number and a dependent service module corresponding to the dependent service module name; and obtaining the names and version numbers of the secondary dependent service modules in the configuration information of the dependent service modules, and continuously searching the secondary dependent service modules corresponding to the names and the version numbers of the secondary dependent service modules until the configuration information of the dependent service modules is empty.
After obtaining the name and version number of the secondary dependent service module in the configuration information of the dependent service module, the method further comprises: if the number of the names of the secondary dependent service modules is larger than 1, searching the secondary dependent service modules corresponding to the names of the secondary dependent service modules and the version numbers of the secondary dependent service modules according to a depth-first algorithm.
After obtaining the name and version number of the secondary dependent service module in the configuration information of the dependent service module, the method further comprises: if the number of the names of the secondary dependent service modules is larger than 1, searching the secondary dependent service modules corresponding to the names of the secondary dependent service modules and the version numbers of the secondary dependent service modules according to a breadth-first algorithm.
The depth priority algorithm and the breadth priority algorithm can calculate all the dependent service modules of the target service module, and the calculation speeds are different according to different relations between the target service module and the dependent service modules.
205. And collecting the service codes corresponding to the target service modules and the service codes corresponding to the dependent modules of the target service modules to generate the front end codes of the target version application programs.
And searching the service codes corresponding to the target service module in the uploaded service codes, searching the service codes corresponding to the dependent modules of the target service module, and collecting the searched service codes to generate the front end codes of the target version application program. Modification, compiling, testing and publishing of the target version application program can be achieved according to the front-end code.
The invention provides a method for obtaining front end codes, which comprises the steps of firstly dividing the front end codes of application programs into at least one service module according to system functions, uploading the service codes corresponding to the service modules, generating service module names, service module version numbers and configuration information corresponding to the service modules, then configuring configuration files of target version application programs, and finally obtaining the front end codes of the target version application programs according to the configuration files and the configuration information corresponding to the target service modules. Compared with the prior art, the embodiment of the invention reflects the association relationship between the service modules by the service module name and the service module version number of the service module in the configuration information through the configuration information of the service modules so as to be convenient for unified management and maintenance. Compared with the prior art, the embodiment of the invention obtains the front-end code corresponding to the target version application program through the configuration file of the target version application program, and realizes the management and maintenance of the front-end code of the specific version application program.
Further, as an implementation of the method shown in fig. 1, a third embodiment of the present invention provides an apparatus for acquiring a front end code, as shown in fig. 3, where the apparatus includes:
a dividing unit 31, configured to divide a front end code of an application into at least one service module according to a system function;
the generating unit 32 is configured to upload a service code corresponding to the service module, and generate a service module name, a service module version number, and configuration information corresponding to the service module, where the configuration information refers to a dependent service module name and a dependent service module version number, except for the service module, that are relied upon when the service module implements a corresponding system function;
a configuration unit 33, configured to configure a configuration file of the target version application program, where the configuration file includes a target service module name and a target service module version number of a target service module referenced by the target version application program;
the acquiring unit 34 is configured to acquire a front end code of the target version application program according to the configuration file and the configuration information corresponding to the target service module, so as to maintain the target version application program.
The invention provides a device for acquiring front end codes, which comprises the steps of firstly dividing the front end codes of an application program into at least one service module according to the system function, uploading the service codes corresponding to the service modules, generating service module names, service module version numbers and configuration information corresponding to the service modules, configuring configuration files of a target version application program, and finally acquiring the front end codes of the target version application program according to the configuration files and the configuration information corresponding to the target service modules. Compared with the prior art, the embodiment of the invention reflects the association relationship between the service modules by the service module name and the service module version number of the service module in the configuration information through the configuration information of the service modules so as to be convenient for unified management and maintenance. Compared with the prior art, the embodiment of the invention obtains the front-end code corresponding to the target version application program through the configuration file of the target version application program, and realizes the management and maintenance of the front-end code of the specific version application program.
Further, as an implementation of the method shown in fig. 2, a fourth embodiment of the present invention provides another apparatus for acquiring a front end code, as shown in fig. 4, where the apparatus includes:
a dividing unit 41 for dividing the front end code of the application program into at least one service module according to the system function;
the generating unit 42 is configured to upload a service code corresponding to the service module, and generate a service module name, a service module version number, and configuration information corresponding to the service module, where the configuration information refers to a dependent service module name and a dependent service module version number, except for the service module, that are relied upon when the service module implements a corresponding system function;
a configuration unit 43, configured to configure a configuration file of the target version application program, where the configuration file includes a target service module name and a target service module version number of a target service module referenced by the target version application program;
the obtaining unit 44 is configured to obtain a front end code of the target version application program according to the configuration file and the configuration information corresponding to the target service module, so as to maintain the target version application program.
Further, the configuration unit 43 includes:
a judging module 431, configured to judge whether the target version application program is a first installed version;
the configuration module 432 is configured to configure all service module names and corresponding version numbers required by the target version application program as configuration files if the determination result is yes;
the configuration module 432 is further configured to configure a configuration file of the application program of the target version according to the version of the installed application program if the determination result is negative.
Further, the configuration module 432 includes:
a checking sub-module 4321 for detecting an installed application version, an update service module name and an update service module version number compared to the target version application;
the configuration submodule 4322 is configured to configure the update service module name and the update service module version number into a configuration file.
Further, the acquisition unit 44 includes:
the searching module 441 is configured to traverse the target service module corresponding to the version number of the target module in the configuration file and the configuration information corresponding to the target service module according to a preset sequence, and search the dependent service module of the target service module;
the generating module 442 is configured to aggregate the service codes corresponding to the target service modules and the service codes corresponding to the dependent service modules of the target service modules, and generate a front end code of the target version application program.
Further, the searching module 441 includes:
an obtaining submodule 4411, configured to obtain a dependent service module name and a dependent service module version number in the target configuration information;
the searching sub-module 4412 is used for searching the dependent service module corresponding to the dependent service module version number and the dependent service module name;
the obtaining submodule 4411 is further configured to obtain a secondary dependent service module name and a secondary dependent service module version number in the configuration information of the dependent service module, and continue to search for a secondary dependent service module corresponding to the secondary dependent service module name and the secondary dependent service module version number until the configuration information of the dependent service module is null.
Further, the method further comprises:
the searching sub-module 4412 is further configured to, after obtaining the secondary dependent service module name and the secondary dependent service module version number in the configuration information of the dependent service module, search, according to a depth-first algorithm, a secondary dependent service module corresponding to the secondary dependent service module name and the secondary dependent service module version number if the number of the secondary dependent service module names is greater than 1.
Further, the method further comprises:
the searching sub-module 4412 is further configured to, after obtaining the secondary dependent service module name and the secondary dependent service module version number in the configuration information of the dependent service module, search, according to the breadth-first algorithm, a secondary dependent service module corresponding to the secondary dependent service module name and the secondary dependent service module version number if the number of the secondary dependent service module names is greater than 1.
The invention provides a device for acquiring front end codes, which comprises the steps of firstly dividing the front end codes of an application program into at least one service module according to the system function, uploading the service codes corresponding to the service modules, generating service module names, service module version numbers and configuration information corresponding to the service modules, configuring configuration files of a target version application program, and finally acquiring the front end codes of the target version application program according to the configuration files and the configuration information corresponding to the target service modules. Compared with the prior art, the embodiment of the invention reflects the association relationship between the service modules by the service module name and the service module version number of the service module in the configuration information through the configuration information of the service modules so as to be convenient for unified management and maintenance. Compared with the prior art, the embodiment of the invention obtains the front-end code corresponding to the target version application program through the configuration file of the target version application program, and realizes the management and maintenance of the front-end code of the specific version application program.
According to a fifth embodiment of the present invention, there is provided a storage medium storing at least one executable instruction, where the computer executable instruction may perform the method for acquiring front-end code in any of the above-mentioned method embodiments.
Fig. 5 shows a schematic structural diagram of a terminal according to a sixth embodiment of the present invention, and the specific embodiment of the present invention is not limited to the specific implementation of the terminal.
As shown in fig. 5, the terminal may include: a processor 502, a communication interface (Communications Interface) 504, a memory 506, and a communication bus 508.
Wherein: processor 502, communication interface 504, and memory 506 communicate with each other via communication bus 508.
A communication interface 504 for communicating with network elements of other devices, such as clients or other servers.
The processor 502 is configured to execute the program 510, and may specifically perform relevant steps in the above-described data query method embodiment.
In particular, program 510 may include program code including computer-operating instructions.
The processor 502 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in the terminal may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
A memory 506 for storing a program 510. Memory 506 may comprise high-speed RAM memory or may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may be specifically operable to cause the processor 502 to:
dividing the front end code of the application program into at least one service module according to the system function;
uploading a service code corresponding to the service module, and generating a service module name, a service module version number and configuration information corresponding to the service module, wherein the configuration information refers to a dependent service module name and a dependent service module version number except the service module, which are relied when the service module realizes a corresponding system function;
configuring a configuration file of a target version application program, wherein the configuration file comprises a target service module name and a target service module version number of a target service module referenced by the target version application program;
and acquiring the front end code of the target version application program according to the configuration file and the configuration information corresponding to the target service module so as to maintain the target version application program.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for acquiring a front-end code, comprising:
dividing the front end code of the application program into at least one service module according to the system function;
uploading a service code corresponding to the service module, and generating a service module name, a service module version number and configuration information corresponding to the service module, wherein the configuration information refers to a dependent service module name and a dependent service module version number except the service module, which are relied when the service module realizes a corresponding system function;
configuring a configuration file of a target version application program, wherein the configuration file comprises a target service module name and a target service module version number of a target service module referenced by the target version application program;
according to the configuration file and the configuration information corresponding to the target service module, acquiring the front end code of the target version application program to maintain the target version application program, including: traversing a target service module corresponding to a target module version number in the configuration file and configuration information corresponding to the target service module according to a preset sequence, and searching a dependent service module of the target service module; collecting service codes corresponding to the target service modules and service codes corresponding to the dependent service modules of the target service modules to generate front end codes of the target version application programs;
the business module for searching the target business module comprises the following steps:
acquiring the name and version number of the dependent service module in the configuration information corresponding to the target service module; searching the dependent service module version number and the dependent service module corresponding to the dependent service module name; and obtaining the name and the version number of the secondary dependent service module in the configuration information of the dependent service module, and continuously searching the secondary dependent service module corresponding to the name and the version number of the secondary dependent service module until the configuration information of the dependent service module is empty.
2. The method of claim 1, wherein configuring the configuration file of the target version application program comprises:
judging whether the target version application program is a first installation version or not;
if the judgment result is yes, configuring all service module names and corresponding version numbers required by the target version application program as the configuration file;
if the result is negative, the configuration file of the target version application program is configured according to the version of the installed application program.
3. The method of claim 2, wherein said configuring said configuration file of said target version application according to an installed application version comprises:
detecting the version of the installed application program, and comparing the version of the installed application program with the version of the target version application program to obtain an updated service module name and an updated service module version number;
and configuring the update service module name and the update service module version number into the configuration file.
4. The method of claim 1, wherein after the obtaining the secondary dependent service module name and the secondary dependent service module version number in the configuration information of the dependent service module, the method further comprises:
and if the number of the secondary dependent service module names is greater than 1, searching the secondary dependent service module corresponding to the secondary dependent service module names and the secondary dependent service module version numbers according to a depth-first algorithm.
5. The method of claim 1, wherein after the obtaining the secondary dependent service module name and the secondary dependent service module version number in the configuration information of the dependent service module, the method further comprises:
and if the number of the secondary dependent service module names is larger than 1, searching the secondary dependent service module corresponding to the secondary dependent service module names and the secondary dependent service module version numbers according to a breadth-first algorithm.
6. An apparatus for acquiring a front-end code, comprising:
the dividing unit is used for dividing the front end code of the application program into at least one service module according to the system function;
the generating unit is used for uploading the service codes corresponding to the service modules and generating service module names, service module version numbers and configuration information corresponding to the service modules, wherein the configuration information refers to the service module names and the service module version numbers which are depended on when the service modules realize the corresponding system functions except the service modules;
the configuration unit is used for configuring a configuration file of the target version application program, wherein the configuration file comprises a target service module name and a target service module version number of a target service module referenced by the target version application program;
the acquisition unit is used for acquiring the front end code of the target version application program according to the configuration file and the configuration information corresponding to the target service module so as to maintain the target version application program;
the acquisition unit includes:
the searching module is used for traversing the target service module corresponding to the version number of the target module in the configuration file and the configuration information corresponding to the target service module according to a preset sequence, and searching the dependent service module of the target service module;
the generating module is used for gathering the service codes corresponding to the target service modules and the service codes corresponding to the dependent service modules of the target service modules and generating the front end codes of the target version application programs;
the searching module comprises:
the obtaining sub-module is used for obtaining the name of the dependent service module and the version number of the dependent service module in the configuration information corresponding to the target service module;
the searching sub-module is used for searching the dependent service module version number and the dependent service module corresponding to the dependent service module name;
and the acquisition sub-module is further used for acquiring the name and the version number of the secondary dependent service module in the configuration information of the dependent service module, and continuously searching the secondary dependent service module corresponding to the name and the version number of the secondary dependent service module until the configuration information of the dependent service module is empty.
7. The apparatus of claim 6, wherein the configuration unit comprises:
the judging module is used for judging whether the application program of the target version is the first installation version or not;
the configuration module is used for configuring all service module names and corresponding version numbers required by the target version application program as configuration files if the judgment result is yes;
and the configuration module is also used for configuring the configuration file of the application program of the target version according to the version of the installed application program if the judgment result is negative.
8. The apparatus of claim 7, wherein the configuration module comprises:
the checking sub-module is used for detecting the version of the installed application program, and comparing the version of the installed application program with the name and the version number of the updated service module of the target version application program;
and the configuration sub-module is used for configuring the name of the update service module and the version number of the update service module into a configuration file.
9. A storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the method of acquiring front end code of any one of claims 1-5.
10. A terminal, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to perform operations corresponding to the method for acquiring front end code according to any one of claims 1-5.
CN201811196769.XA 2018-10-15 2018-10-15 Method and device for acquiring front-end codes Active CN109582347B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811196769.XA CN109582347B (en) 2018-10-15 2018-10-15 Method and device for acquiring front-end codes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811196769.XA CN109582347B (en) 2018-10-15 2018-10-15 Method and device for acquiring front-end codes

Publications (2)

Publication Number Publication Date
CN109582347A CN109582347A (en) 2019-04-05
CN109582347B true CN109582347B (en) 2024-04-02

Family

ID=65920075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811196769.XA Active CN109582347B (en) 2018-10-15 2018-10-15 Method and device for acquiring front-end codes

Country Status (1)

Country Link
CN (1) CN109582347B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113098961B (en) * 2021-03-31 2023-04-07 北京自如信息科技有限公司 Component uploading method, device and system, computer equipment and readable storage medium
CN115454391B (en) * 2022-11-11 2023-06-16 零氪科技(北京)有限公司 Client, client construction method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023983A (en) * 2009-09-11 2011-04-20 首都师范大学 Statistical space-time database and managing method thereof
CN102541851A (en) * 2010-12-10 2012-07-04 金蝶软件(中国)有限公司 Page modularity generation method and page modularity generation system
CN106843820A (en) * 2015-12-04 2017-06-13 阿里巴巴集团控股有限公司 Code process method and apparatus
CN108334334A (en) * 2018-03-07 2018-07-27 政采云有限公司 A kind of management relies on the method and system of packet version

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0026363D0 (en) * 2000-10-27 2000-12-13 Sgs Thomson Microelectronics Bi-endian libraries
US9804829B2 (en) * 2016-03-31 2017-10-31 Ca, Inc. Interface definition language compiler with version reconciliation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102023983A (en) * 2009-09-11 2011-04-20 首都师范大学 Statistical space-time database and managing method thereof
CN102541851A (en) * 2010-12-10 2012-07-04 金蝶软件(中国)有限公司 Page modularity generation method and page modularity generation system
CN106843820A (en) * 2015-12-04 2017-06-13 阿里巴巴集团控股有限公司 Code process method and apparatus
CN108334334A (en) * 2018-03-07 2018-07-27 政采云有限公司 A kind of management relies on the method and system of packet version

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Android系统非应用层软件的管理和优化;蔡完锡;李叠;刘昊;褥震;董渊;;计算机工程与设计;20160516(第05期);第264-272页 *

Also Published As

Publication number Publication date
CN109582347A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
US10740093B2 (en) Advanced packaging techniques for improving work flows
CN109086071A (en) A kind of method and server of management software version information
US8782635B2 (en) Reconfiguration of computer system to allow application installation
US11074154B2 (en) Identifying a source file for use in debugging compiled code
US9612946B2 (en) Using linked data to determine package quality
Gunarathne Hadoop MapReduce v2 Cookbook
US11762822B2 (en) Determining when a change set was delivered to a workspace or stream and by whom
US9946630B2 (en) Efficiently debugging software code
US10592304B2 (en) Suggesting application programming interfaces based on feature and context analysis
CN109582347B (en) Method and device for acquiring front-end codes
US11089000B1 (en) Automated source code log generation
CN111309586A (en) Command testing method, device and storage medium thereof
CN114116505A (en) Code testing method and device
CN112527459B (en) Log analysis method and device based on Kubernetes cluster
CN111240987A (en) Migration program detection method and device, electronic equipment and computer readable storage medium
CN111666201A (en) Regression testing method, device, medium and electronic equipment
US11847120B2 (en) Performance of SQL execution sequence in production database instance
CN115167822A (en) Branch code merging method, device, equipment and storage medium
US20210286826A1 (en) Computer-Implemented Method and System for Attribute Discovery for Operation Objects from Operation Data
CN110119351B (en) Test case execution method and device
Doglio Mastering Python High Performance
US11853750B2 (en) Subject matter expert identification and code analysis based on a probabilistic filter
CN116483735B (en) Method, device, storage medium and equipment for analyzing influence of code change
CN113741956B (en) Method and device for transplanting version management function, version management method and device
US20240028408A1 (en) Reference implementation of cloud computing resources

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant