CN111459469B - Project code initialization method, device and equipment - Google Patents

Project code initialization method, device and equipment Download PDF

Info

Publication number
CN111459469B
CN111459469B CN202010261000.2A CN202010261000A CN111459469B CN 111459469 B CN111459469 B CN 111459469B CN 202010261000 A CN202010261000 A CN 202010261000A CN 111459469 B CN111459469 B CN 111459469B
Authority
CN
China
Prior art keywords
initialization
template
project
parameter
target
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
CN202010261000.2A
Other languages
Chinese (zh)
Other versions
CN111459469A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202010261000.2A priority Critical patent/CN111459469B/en
Publication of CN111459469A publication Critical patent/CN111459469A/en
Application granted granted Critical
Publication of CN111459469B publication Critical patent/CN111459469B/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/30Creation or generation of source code
    • G06F8/33Intelligent editors

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a method, a device and equipment for initializing project codes, the method comprises the steps of receiving an initialization instruction, wherein the initialization instruction carries a template mark, determining an initialization project template matched with the template mark according to the initialization instruction, wherein the initialization project template comprises at least one parameter option information and a configuration file, receiving a parameter selection result triggered by a user according to the at least one parameter option information, and extracting codes corresponding to the parameter selection result from project codes corresponding to the initialization project template according to the configuration file to obtain an object code after initialization. The accuracy of project code initialization is improved.

Description

Project code initialization method, device and equipment
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a project code initialization method, a device and equipment.
Background
In software project development, initializing project code is an indispensable step. For different business projects, there may be some different specification constraints (such as submitting specification, writing specification), general configuration of the projects, functions (base component, business component) and the like, and the basic conditions for completing the development of the current project can be configured by initializing project codes, so that preparation is made for the development of the project.
Typically, project code initialization requires some framework and functionality to be used with existing projects. For example, whether an existing a-frame or B-frame is technically selected, whether internationalization, skin replacement functions, business function modules, general processing logic, etc. are functionally required to be supported. After the selection is determined, a programmer is required to manually extract the code file associated with the selection, and then the initialization of the project code is completed.
However, either the selection of a framework or the selection of a function, a programmer is required to manually copy many relevant code files after selection. In the copying process, the situation that a plurality of irrelevant code files are copied more and a plurality of error code files are copied less or copied possibly occurs, so that the accuracy of project code initialization is affected, and the development efficiency of software projects is further affected.
Disclosure of Invention
The embodiment of the invention provides a method, a device and equipment for initializing project codes, which are used for improving the accuracy of project code initialization.
In a first aspect, an embodiment of the present invention provides a method for initializing an item code, including: receiving an initialization instruction, wherein the initialization instruction carries a template mark; determining an initialization item template matched with the template identifier according to the initialization instruction, wherein the initialization item template comprises at least one parameter option information and a configuration file; receiving a parameter selection result triggered by a user according to at least one parameter option information; and extracting codes corresponding to the parameter selection result from the project codes corresponding to the initialized project templates according to the configuration file, and obtaining the initialized target codes.
Optionally, the receiving the parameter selection result triggered by the user according to at least one parameter option information includes: analyzing the configuration file, and determining a first target initialization parameter option to be displayed; displaying the first target initialization parameter options in a visual interface; and receiving a parameter selection result triggered by a user in the visual interface according to the first target initialization parameter option.
Optionally, the receiving the parameter selection result triggered by the user according to at least one parameter option information includes: analyzing the configuration file, and determining a second target initialization parameter option to be popped up; ejecting the second target initialization parameter option in a mode of a DOS command window of a disk operating system; and receiving a parameter selection result triggered by a user in the DOS command window according to the second target initialization parameter option.
Optionally, before the receiving the initialization instruction, the method further includes: acquiring the template mark; judging whether a target initialization project template matched with the template identifier exists in an initialization project template set according to the template identifier; if the target initialization project template matched with the template identification does not exist, a new initialization project template matched with the template identification is established.
Optionally, the method further comprises: if a target initialization project template matched with the template identification exists, acquiring an initialization requirement list; judging whether the initialization requirement can be met or not according to the parameter option information in the target initialization project template and the initialization requirement list; if the initialization requirement cannot be met, updating the target initialization project template according to the initialization requirement list to obtain a new target initialization project template.
Optionally, the method further comprises: acquiring a total configuration file corresponding to the initialization project template set, wherein the total configuration file is a file describing basic information of the whole template library; acquiring application rights of all initialization project templates in the initialization project template set from the total configuration file, wherein the application rights are in normal use, forbidden or updated; and adjusting the application authority of each initialization project template in the initialization project template set according to the actual authority requirement.
Optionally, before the receiving the initialization instruction, the method further includes: establishing a corresponding initialization project file according to the template identification; acquiring parameter option information and configuration files corresponding to the template identification; and storing the parameter option information and the configuration file into the initialization project file to obtain an initialization project template.
Optionally, after the storing the parameter option information and the configuration file in the initialization project file to obtain an initialization project template, the method further includes: and storing the initialization item template into an intranet gitlab or an extranet gitub hosting platform.
Optionally, the parameter option information includes: at least one of a bottom layer development framework parameter option, an application terminal parameter option, whether an internationalization function parameter option is required, whether a skin function parameter option is required to be changed, and a unit test library parameter option.
Optionally, the initialization project template is a template for developing shooting games based on a java based first frame, a template for developing live games based on a python based second frame or a template for developing mobile terminal h5 pages based on js.
In a second aspect, an embodiment of the present invention provides an item code initializing device, including: the touch module is used for receiving an initialization instruction, wherein the initialization instruction carries a template mark; the processing module is used for determining an initialization project template matched with the template identifier according to the initialization instruction, wherein the initialization project template comprises at least one parameter option information and a configuration file; the touch module is used for receiving a parameter selection result triggered by a user according to at least one parameter option information; and the processing module is used for extracting codes corresponding to the parameter selection results from the project codes corresponding to the initialized project templates according to the configuration file to obtain the initialized target codes.
Optionally, the touch module is further configured to: analyzing the configuration file, and determining a first target initialization parameter option to be displayed; displaying the first target initialization parameter options in a visual interface; and receiving a parameter selection result triggered by a user in the visual interface according to the first target initialization parameter option.
Optionally, the touch module is further configured to: analyzing the configuration file, and determining a second target initialization parameter option to be popped up; ejecting the second target initialization parameter option in a mode of a DOS command window of a disk operating system; and receiving a parameter selection result triggered by a user in the DOS command window according to the second target initialization parameter option.
Optionally, the touch module is further configured to: acquiring the template mark; judging whether a target initialization project template matched with the template identifier exists in an initialization project template set according to the template identifier; if the target initialization project template matched with the template identification does not exist, a new initialization project template matched with the template identification is established.
In a third aspect, an embodiment of the present invention provides an item code initialization apparatus, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the project code initialization method of any one of the first aspects.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer-executable instructions are stored, which when executed by a processor, implement the project code initialization method according to any one of the first aspects.
After the scheme is adopted, the project code initialization method, device and equipment can be used for determining the initialization project template according to the template identification in the initialization instruction, then acquiring a parameter selection result triggered by a user according to parameter option information in the initialization project template, acquiring codes corresponding to the parameter selection result according to the configuration file, obtaining the initialized codes, eliminating the need of manually copying the file by a programmer, improving the project code initialization accuracy, and further improving the software project development efficiency.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a schematic diagram of an exemplary embodiment of a method for initializing project codes;
FIG. 2 is a flowchart illustrating a method for initializing project codes according to an embodiment of the present invention;
FIG. 3 is a schematic illustration of an application of a visual interface provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of an initialization project template set architecture according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a project code initializing device according to an embodiment of the present invention;
fig. 6 is a schematic hardware structure of an item code initializing device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be capable of implementation in sequences other than those illustrated or otherwise described. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The software project development flow is a general process from design to implementation of software, and mainly comprises a series of operations of carrying out demand analysis on the software, designing functions of the software, coding, debugging, program joint debugging, testing, submitting programs and the like. In the encoding process, project codes are generally required to be initialized first, and basic conditions for completing the current project development are configured so as to be ready for the project development.
Typically, project code initialization requires some framework and functionality to be used with existing projects. For example, there is a need in the art to use existing frameworks, whether there is a need to support internationalized controls, skin change functionality controls or other existing business functionality modules, and general processing logic, etc. for functionality.
However, when the existing framework or function is selected to be used, a programmer is required to manually extract the code files associated with the selection, however, in the process of copying the code files, a situation that a few irrelevant code files are copied more and a wrong code file is copied less may occur, which affects the accuracy of project code initialization.
The technical scheme of the invention aims to solve the problems in the prior art and provides the following solution ideas: in the process of initializing the project codes, a corresponding initialized project template is obtained by utilizing the template mark, and the project code is initialized without manually copying related code files by a programmer, so that the aim of improving the project code initialization accuracy is fulfilled.
Fig. 1 is a schematic architecture diagram of an item code initialization method according to an embodiment of the present invention, as shown in fig. 1, including a processing server 101 and a database 102, where the processing server 101 is configured to receive an initialization instruction, acquire a corresponding initialization template according to a template identifier carried in the received initialization instruction, and perform initialization processing according to the acquired initialization template. The database 102 is used to store an initialization project template for the database 102 to call. The database 102 may be a local database or a cloud database. The object code after initialization may be applied to game items, ticket order items, social items, etc., and is not particularly limited herein.
The technical scheme of the invention is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 2 is a flowchart of an item code initialization method according to an embodiment of the present invention, where the method of the present embodiment may be performed by the processing server 101. As shown in fig. 2, the method of the present embodiment may include:
s201: and receiving an initialization instruction, wherein the initialization instruction carries a template identifier.
Specifically, when the code initialization is required, a programmer can manually trigger an initialization instruction, and the processing server receives the initialization instruction. The initialization instruction carries a template identifier, and the template identifier can be used for corresponding to an initialization item template for subsequent initialization processing.
In addition, the template mark can be defined according to the actual situation. Wherein at least one of lower case letters, upper case letters, arabic numerals, and Roman numerals may be included. The name of the project template can also be directly initialized to be used as a template identifier.
S202: and determining an initialization project template matched with the template identifier according to the initialization instruction, wherein the initialization project template comprises at least one parameter option information and a configuration file.
Specifically, a matched initialization item template may be determined based on the template identification.
In addition, the parameter option information in the initialization project template is a function which needs to be initialized by a programmer, for example, whether an XX function (internationalization function, skin change function and the like) is needed, whether an A frame or a B frame is selected, and whether a C library or a D library is selected and other units are used for testing the general configuration of projects.
The configuration file is used for configuring parameter options to be displayed on the visual page or parameter options to be popped up in the DOC window when the template is pulled, and the corresponding relation between each parameter option and the code to be extracted. The extracted codes can be part of the project codes corresponding to the initialized project templates. For example, the project codes corresponding to the initialized project templates include a processing procedure corresponding to the internationalization function and a processing procedure corresponding to the internationalization function not required, and when a programmer triggers an option requiring the internationalization function, the codes corresponding to the internationalization function parts can be extracted according to the configuration file. The type of the configuration file may be json file type, or other file types that may implement the corresponding function.
S203: and receiving a parameter selection result triggered by the user according to at least one parameter option information.
Specifically, the user may be a programmer, manager, or other person who may trigger the parameter options. After the user triggers the parameter option information, all the triggered parameter option information can be summarized to obtain a parameter selection result. For example, the parameter selection result may be a need for internationalization function, an option framework a, and an option C library.
In addition, the preference information can distinguish whether a certain function is required by custom tag rules. Similar to the template engine label of a program, but the custom label of the template cannot be the same as the label of the program template engine. Therefore, the labels are generally customized to a relatively unusual format, so that the problem of inaccurate identification during code extraction is avoided.
In a specific example, when defining whether the internationalization function option is needed, the label defining whether the internationalization function option is needed starts with <% >, and the # >, and the specific implementation manner is as follows:
the user on the// page checks whether internationalization function is required,
<%#if(i18n){#%>
if the input i18n is true
import i18n from'./i18n';
Vue.use(Element,{
i18n:key=>i18n.t(key)
});
<%#}else{#%>
If the input i18n is not true
Vue.use(Element);
<%#}#%>
S204: and extracting codes corresponding to the parameter selection result from the project codes corresponding to the initialized project templates according to the configuration file, and obtaining the initialized target codes.
Specifically, after the parameter selection result is obtained, a corresponding code can be extracted from the project codes corresponding to the initialized project template according to the corresponding relation between each parameter option in the configuration file and the code to be extracted, so as to obtain the target code after initialization. In addition, a folder can be generated, the object codes are stored in the folder, and the folder is stored locally, so that the subsequent system call is facilitated.
In addition, after the object code after the initialization is obtained, if the generated code also needs to rely on a third party module package, a programmer is required to trigger the initialization again. If the generated code no longer needs to rely on the third party module package, the programmer is not required to trigger the starting initialization again.
After the scheme is adopted, the initialization project template can be determined according to the template identification in the initialization instruction, then the parameter selection result triggered by the user according to the parameter option information in the initialization project template is obtained, the code corresponding to the parameter selection result is obtained according to the configuration file, the code after initialization is obtained, a programmer does not need to manually copy the file, the project code initialization accuracy is improved, and further the software project development efficiency is improved.
The examples of the present specification also provide some specific embodiments of the method based on the method of fig. 2, which is described below.
In a specific embodiment, the receiving the parameter selection result triggered by the user according to at least one parameter option information may include:
and analyzing the configuration file to determine a first target initialization parameter option to be displayed.
And displaying the first target initialization parameter options in a visual interface.
And receiving a parameter selection result triggered by a user in the visual interface according to the first target initialization parameter option.
Specifically, in order to improve the intuitiveness and convenience of the operation of the programmer, the initialization parameter options required to be selected by the programmer can be displayed in the visual interface. The programmer can directly select the parameter options to be triggered in the visual interface.
As shown in fig. 3, an application schematic diagram of a visual interface provided in an embodiment of the present invention is shown, in this embodiment, whether to initialize an internationalization function and whether to initialize a skin change function are displayed in the visual interface, and two trigger buttons are also located behind each function, one is yes and the other is no.
In addition, in order to start the deployed WEB side service, for example, an initialization project template library service with the service address of http://192.168.70.100:8080/template is started. After the service website is input, an initialization project template library page is entered, and project template libraries a, b, c and the like contained in the initialization project template library are listed on the initialization project template library page. If the project template library a is to be initialized, clicking the corresponding project template library a can enter the corresponding initialization operation page.
In a specific embodiment, the receiving the parameter selection result triggered by the user according to at least one parameter option information may include:
and analyzing the configuration file to determine a second target initialization parameter option to be popped up.
The second target initialization parameter option is popped up in the manner of a DOS (Disk Operating System ) command window.
And receiving a parameter selection result triggered by a user in the DOS command window according to the second target initialization parameter option.
Specifically, in order to reduce the memory occupied by the code file and improve the simplicity of the template, the initialization parameter options required to be selected by the programmer can be popped up in a DOS command window mode. The programmer can directly select the parameter options to trigger in the DOS command window.
In a specific embodiment, before the receiving the initialization instruction, the method may further include:
and obtaining the template mark. Judging whether a target initialization project template matched with the template identification exists in the initialization project template set according to the template identification. If the target initialization project template matched with the template identification does not exist, a new initialization project template matched with the template identification is established.
Specifically, after the template identifier is obtained, a corresponding initialization item template needs to be obtained according to the template identifier. Wherein, there may be a plurality of initialization project templates to form an initialization project template set. Each initialization item template has a unique template identification. Therefore, whether the target initialization project template matched with the template identifier is contained in the initialization project template set can be judged according to the template identifier, and if the target initialization project template matched with the template identifier is not contained, an initialization project template matched with the template identifier is newly built. The newly-built initialization project template comprises a template identifier. For example, when a new project is started, the project is an office management background project implemented by applying the php technology, and no appropriate module project template in the current initialization project template set can initialize codes, so that an initialization project template matched with the office management background project implemented by the php technology can be newly created. And the template identification of the initialization project template can be embodied as a template suitable for office management background projects implemented by applying the php technology. Or a programmer is required to determine the project applicable to the template according to the template identification. Then when the initialization command is triggered, the template identifier corresponding to the available template can be manually input.
In a specific embodiment, the method may further include:
and if the target initialization project template matched with the template identification exists, acquiring an initialization requirement list.
And judging whether the initialization requirement can be met according to the parameter option information in the target initialization project template and the initialization requirement list.
If the initialization requirement cannot be met, updating the target initialization project template according to the initialization requirement list to obtain a new target initialization project template.
Specifically, if the currently existing template can only meet part of the initialization requirements, that is, cannot meet all the initialization requirements, the target initialization item template can be updated according to the initialization requirement list. The target initialization project template is a template which can be matched with the template mark and can meet part of initialization requirements. For example, continuing to take an office management background item implemented by the php technology as an example, there is a target initialization item template in the initialization item template set, which is matched with the office management background item implemented by the php technology, but the office management background item implemented by the php technology increases new initialization requirements. The new initialization requirement is that the initialization application language is Chinese or English, but the current target initialization project template is not provided with the initialization option, so that the target initialization project template needs to be updated, and the initialization application language option is added into the target initialization project template to form the new initialization project template.
In a specific embodiment, the method may further include:
and acquiring a total configuration file corresponding to the initialization project template set, wherein the total configuration file is a file describing basic information of the whole template library.
And acquiring the application authority of each initialization item template in the initialization item template set from the total configuration file, wherein the application authority is normally used, forbidden or updated.
And adjusting the application authority of each initialization project template in the initialization project template set according to the actual authority requirement.
Specifically, fig. 4 is a schematic diagram of an initialization project template set architecture provided by an embodiment of the present invention, as shown in fig. 4, the initialization project template set includes three initialization project templates a, b, and c, and each initialization project template may further include a plurality of project library template files, project library help files, and project library configuration files. In addition, a help document describing the entire initialization project template set and an overall project library profile, i.e., a total profile, are included. The general configuration file mainly describes basic information of the whole template set, such as which project templates are contained, a use instruction, how to add a project template, how to deploy web-side services or other common points, and the like. The type of the total configuration file can be json file type, and the configuration information of the total configuration file can be visually displayed on the web side.
In addition, the total configuration file can also configure the application authority of each initialization project template in the initialization project template set. The application permission can be in normal use, forbidden or updated, wherein the initialized project template is in an unavailable state under the permission in the update and forbidden permission states. For example, as shown in fig. 4, the application rights of the three initialization project templates are available, including a, b and c initialization project templates. At this time, if the initialization item template a is to be disabled, the application authority of the initialization item template a may be updated to a disabled state.
In a specific embodiment, before the receiving the initialization instruction, the method may further include:
and establishing a corresponding initialization project file according to the template identification.
And acquiring parameter option information and configuration files corresponding to the template identification.
And storing the parameter option information and the configuration file into the initialization project file to obtain an initialization project template.
In a specific embodiment, after the storing the parameter option information and the configuration file in the initialization project file to obtain an initialization project template, the method may further include:
and storing the initialization project template into an intranet gitlab or extranet github hosting platform, wherein the platform supports multi-person maintenance, and improves the efficiency of multi-person collaborative processing.
In a specific embodiment, the parameter option information may include: at least one of a bottom layer development framework parameter option, an application terminal parameter option, whether an internationalization function parameter option is required, whether a skin function parameter option is required to be changed, and a unit test library parameter option.
In a specific embodiment, the initialization project template may be a java-based template for developing a shooting game, a python-based template for developing a live game, or js-based template for developing a mobile terminal h5 page.
Specifically, taking a game item as an example, a management background GM of a WEB version or an operator needs to be developed, the management background language is a java spring frame, the WEB front end is a vue.js, the mobile phone end is a real item, at this time, the initialization item templates corresponding to three items are respectively an a (java spring frame) template and a b (WEB front end is a vue.js) template c (react native) template. Taking the b template as an example, initializing the b template, and selecting whether internationalization, skin function change, eslin, unit test, mobile terminal project or PC terminal project, minimum compatible quantity of the browser and other parameter options on a visual interface. And after the b template is selected and determined in the visual interface, a selection result is obtained, and then a relevant code is generated from item codes corresponding to the b template according to the selection result to be used as an initialization code for initializing front-end development of the management background web end.
When the management background of other games is played, a programmer is not required to carry out complex human meat configuration, an initialized code can be generated only by selecting a corresponding parameter option in a visual interface, project development can be quickly carried out, the consistency of the file structure of different projects in the same technical stack is ensured to a certain extent, developers of different project groups can be quickly familiar with different projects, and the project development efficiency is improved.
Based on the same idea, the embodiment of the present disclosure further provides a device corresponding to the method, and fig. 5 is a schematic structural diagram of an item code initializing device provided by the embodiment of the present disclosure, as shown in fig. 5, may include:
the touch module 501 is configured to receive an initialization instruction, where the initialization instruction carries a template identifier.
And the processing module 502 is configured to determine an initialization item template that matches the template identifier according to the initialization instruction, where the initialization item template includes at least one parameter option information and a configuration file.
The touch module 501 is configured to receive a parameter selection result triggered by a user according to at least one parameter option information.
The processing module 502 is configured to extract, according to the configuration file, a code corresponding to the parameter selection result from the project codes corresponding to the initialized project template, so as to obtain an object code after initialization.
In a specific embodiment, the touch module 501 is further configured to:
and analyzing the configuration file to determine a first target initialization parameter option to be displayed.
And displaying the first target initialization parameter options in a visual interface.
And receiving a parameter selection result triggered by a user in the visual interface according to the first target initialization parameter option.
In a specific embodiment, the touch module 501 is further configured to:
and analyzing the configuration file to determine a second target initialization parameter option to be popped up.
And popping up the second target initialization parameter option in a DOS command window mode.
And receiving a parameter selection result triggered by a user in the DOS command window according to the second target initialization parameter option.
In a specific embodiment, the touch module 501 is further configured to:
and obtaining the template mark.
Judging whether a target initialization project template matched with the template identification exists in the initialization project template set according to the template identification.
If the target initialization project template matched with the template identification does not exist, a new initialization project template matched with the template identification is established.
In a specific embodiment, the processing module 502 is further configured to:
and if the target initialization project template matched with the template identification exists, acquiring an initialization requirement list.
And judging whether the initialization requirement can be met according to the parameter option information in the target initialization project template and the initialization requirement list.
If the initialization requirement cannot be met, updating the target initialization project template according to the initialization requirement list to obtain a new target initialization project template.
In a specific embodiment, the processing module 502 is further configured to:
and acquiring a total configuration file corresponding to the initialization project template set, wherein the total configuration file is a file describing basic information of the whole template library.
And acquiring the application authority of each initialization item template in the initialization item template set from the total configuration file, wherein the application authority is normally used, forbidden or updated.
And adjusting the application authority of each initialization project template in the initialization project template set according to the actual authority requirement.
In a specific embodiment, the touch module 501 is further configured to:
and establishing a corresponding initialization project file according to the template identification.
And acquiring parameter option information and configuration files corresponding to the template identification.
And storing the parameter option information and the configuration file into the initialization project file to obtain an initialization project template.
In a specific embodiment, the processing module 502 is further configured to:
and storing the initialization item template into an intranet gitlab or an extranet gitub hosting platform.
In one specific embodiment, the parameter option information includes: at least one of a bottom layer development framework parameter option, an application terminal parameter option, whether an internationalization function parameter option is required, whether a skin function parameter option is required to be changed, and a unit test library parameter option.
In a specific embodiment, the initialization project template is a template for developing shooting games based on a java first framework, a template for developing live games based on a python second framework or a template for developing mobile end h5 pages based on js.
The device provided by the embodiment of the present invention can implement the method of the embodiment shown in fig. 2, and its implementation principle and technical effects are similar, and will not be described herein.
Fig. 6 is a schematic hardware structure of an item code initializing device according to an embodiment of the present invention. As shown in fig. 6, the apparatus 600 provided in this embodiment includes: at least one processor 601 and a memory 602. The processor 601 and the memory 602 are connected by a bus 603.
In a specific implementation, at least one processor 601 executes computer-executable instructions stored in the memory 602, so that the at least one processor 601 performs the method in the above method embodiments.
The specific implementation process of the processor 601 may refer to the above-mentioned method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In the embodiment shown in fig. 6, it should be understood that the processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: digital Signal Processor, abbreviated as DSP), application specific integrated circuits (english: application Specific Integrated Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise high speed RAM memory or may further comprise non-volatile storage NVM, such as at least one disk memory.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and when a processor executes the computer execution instructions, the project code initialization method of the method embodiment is realized.
The computer readable storage medium described above may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). The processor and the readable storage medium may reside as discrete components in a device.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (11)

1. A method for initializing an item code, comprising:
receiving an initialization instruction, wherein the initialization instruction carries a template mark;
determining an initialization project template matched with the template identification according to the initialization instruction, wherein the initialization project template comprises at least one parameter option information and a configuration file, and the initialization project template is a template for developing a shooting game based on a java based on a first frame, a template for developing a live broadcast based on a python based on a second frame or a template for developing a mobile terminal h5 page based on js;
receiving a parameter selection result triggered by a user according to at least one parameter option information;
extracting codes corresponding to the parameter selection result from project codes corresponding to the initialized project templates according to the configuration files to obtain initialized target codes;
the step of receiving the parameter selection result triggered by the user according to at least one parameter option information comprises the following steps:
analyzing the configuration file, and determining a second target initialization parameter option to be popped up;
ejecting the second target initialization parameter option in a mode of a DOS command window of a disk operating system;
and receiving a parameter selection result triggered by a user in the DOS command window according to the second target initialization parameter option.
2. The method of claim 1, further comprising, prior to said receiving an initialization instruction:
acquiring the template mark;
judging whether a target initialization project template matched with the template identifier exists in an initialization project template set according to the template identifier;
if the target initialization project template matched with the template identification does not exist, a new initialization project template matched with the template identification is established.
3. The method as recited in claim 2, further comprising:
if a target initialization project template matched with the template identification exists, acquiring an initialization requirement list;
judging whether the initialization requirement can be met or not according to the parameter option information in the target initialization project template and the initialization requirement list;
if the initialization requirement cannot be met, updating the target initialization project template according to the initialization requirement list to obtain a new target initialization project template.
4. The method as recited in claim 2, further comprising:
acquiring a total configuration file corresponding to the initialization project template set, wherein the total configuration file is a file describing basic information of the whole template library;
acquiring application rights of all initialization project templates in the initialization project template set from the total configuration file, wherein the application rights are in normal use, forbidden or updated;
and adjusting the application authority of each initialization project template in the initialization project template set according to the actual authority requirement.
5. The method of any of claims 1-4, further comprising, prior to said receiving an initialization instruction:
establishing a corresponding initialization project file according to the template identification;
acquiring parameter option information and configuration files corresponding to the template identification;
and storing the parameter option information and the configuration file into the initialization project file to obtain an initialization project template.
6. The method of claim 5, further comprising, after said storing said preference information and said configuration file in said initialization project file to obtain an initialization project template:
and storing the initialization item template into an intranet gitlab or an extranet gitub hosting platform.
7. The method of claim 5, wherein the preference information comprises: at least one of a bottom layer development framework parameter option, an application terminal parameter option, whether an internationalization function parameter option is required, whether a skin function parameter option is required to be changed, and a unit test library parameter option.
8. An item code initializing device, comprising:
the touch module is used for receiving an initialization instruction, wherein the initialization instruction carries a template mark;
the processing module is used for determining an initialization project template matched with the template identification according to the initialization instruction, wherein the initialization project template comprises at least one parameter option information and a configuration file, and is a template for developing shooting games based on a first frame by java, a template for developing live broadcasting based on a second frame by python or a template for developing a mobile terminal h5 page based on js;
the touch module is used for receiving a parameter selection result triggered by a user according to at least one parameter option information;
the processing module is used for extracting codes corresponding to the parameter selection results from the project codes corresponding to the initialized project templates according to the configuration files to obtain initialized target codes;
the touch module is further configured to: analyzing the configuration file, and determining a second target initialization parameter option to be popped up;
ejecting the second target initialization parameter option in a mode of a DOS command window of a disk operating system;
and receiving a parameter selection result triggered by a user in the DOS command window according to the second target initialization parameter option.
9. The apparatus of claim 8, wherein the touch module is further configured to:
acquiring the template mark;
judging whether a target initialization project template matched with the template identifier exists in an initialization project template set according to the template identifier;
if the target initialization project template matched with the template identification does not exist, a new initialization project template matched with the template identification is established.
10. An item code initialization apparatus, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the project code initialization method of any one of claims 1 to 7.
11. A computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, implement the project code initialization method of any one of claims 1 to 7.
CN202010261000.2A 2020-04-03 2020-04-03 Project code initialization method, device and equipment Active CN111459469B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010261000.2A CN111459469B (en) 2020-04-03 2020-04-03 Project code initialization method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010261000.2A CN111459469B (en) 2020-04-03 2020-04-03 Project code initialization method, device and equipment

Publications (2)

Publication Number Publication Date
CN111459469A CN111459469A (en) 2020-07-28
CN111459469B true CN111459469B (en) 2024-02-06

Family

ID=71681629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010261000.2A Active CN111459469B (en) 2020-04-03 2020-04-03 Project code initialization method, device and equipment

Country Status (1)

Country Link
CN (1) CN111459469B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112965708A (en) * 2021-03-29 2021-06-15 武汉悦学帮网络技术有限公司 Code generation method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209385A (en) * 2019-05-09 2019-09-06 无线生活(杭州)信息科技有限公司 Establishment of item method and device
CN110286885A (en) * 2019-06-27 2019-09-27 江苏满运软件科技有限公司 Automate initial development method, system, computer equipment and storage medium
CN110442329A (en) * 2019-06-26 2019-11-12 平安科技(深圳)有限公司 Generation method, device, storage medium and the computer equipment of code segment
CN110489106A (en) * 2019-07-22 2019-11-22 北京字节跳动网络技术有限公司 A kind of generation method, device, medium and the electronic equipment of project initial code

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9547482B2 (en) * 2015-06-02 2017-01-17 Sap Portals Israel Ltd. Declarative design-time experience platform for code generation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209385A (en) * 2019-05-09 2019-09-06 无线生活(杭州)信息科技有限公司 Establishment of item method and device
CN110442329A (en) * 2019-06-26 2019-11-12 平安科技(深圳)有限公司 Generation method, device, storage medium and the computer equipment of code segment
CN110286885A (en) * 2019-06-27 2019-09-27 江苏满运软件科技有限公司 Automate initial development method, system, computer equipment and storage medium
CN110489106A (en) * 2019-07-22 2019-11-22 北京字节跳动网络技术有限公司 A kind of generation method, device, medium and the electronic equipment of project initial code

Also Published As

Publication number Publication date
CN111459469A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
US9602347B2 (en) Method, system and program for browser to switch IE kernel
US7908560B2 (en) Method and system for cross-screen component communication in dynamically created composite applications
CN106708704B (en) Method and device for classifying crash logs
CN109033466B (en) Page sharing method calculates equipment and computer storage medium
US10684826B2 (en) Method and device for page rendering and validation
EP3852032A1 (en) Machine first approach for identifying accessibility, non-compliances, remediation techniques and fixing at run-time
Awwad et al. Automated Bidirectional Languages Localization Testing for Android Apps with Rich GUI.
CN106873989A (en) Application program building method and device
CN113986257A (en) Cloud platform front-end management interface deployment method and device and storage medium
CN113778391A (en) Page processing method, device and equipment for native application program
CN111459469B (en) Project code initialization method, device and equipment
CN101506772B (en) Environment state changes to alter functionality
CN113760266B (en) Method and device for creating function module file and electronic equipment
CN113360379B (en) Program test environment creation method and program test environment creation apparatus
US20220334853A1 (en) System and method for accelerating modernization of user interfaces in a computing environment
US7100039B2 (en) Systems and methods for a bootstrap mechanism for software execution
CN107077365B (en) Selectively loading precompiled headers and/or portions thereof
CN116795377A (en) Code data processing method and device
CN115374009A (en) Interface automation test method, device, equipment, medium and program product
CN110046317A (en) Page info recording method, terminal and the storage medium of IOS application
CN111142735B (en) Software page creating method and device, terminal equipment and storage medium
CN114968627A (en) System anomaly detection method and device and electronic equipment
CN111444456B (en) Style editing method and device and electronic equipment
CN110327626B (en) Virtual server creation method and device
CN111459608A (en) Application system deployment method and device, computer equipment and storage medium

Legal Events

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