CN112099794A - Front-end project construction method and device - Google Patents

Front-end project construction method and device Download PDF

Info

Publication number
CN112099794A
CN112099794A CN202011039295.5A CN202011039295A CN112099794A CN 112099794 A CN112099794 A CN 112099794A CN 202011039295 A CN202011039295 A CN 202011039295A CN 112099794 A CN112099794 A CN 112099794A
Authority
CN
China
Prior art keywords
code
preset
project
template
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.)
Pending
Application number
CN202011039295.5A
Other languages
Chinese (zh)
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202011039295.5A priority Critical patent/CN112099794A/en
Publication of CN112099794A publication Critical patent/CN112099794A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a front-end project construction method and a front-end project construction device, wherein the method comprises the following steps: receiving a construction request of a front-end project; determining a target project template according to the construction request; generating a project code according to the target project template, and generating a code dependence according to the project code; acquiring a preset code, and processing the preset code according to code dependence to acquire a preset target code; and constructing a preset front-end project according to the preset target code. The invention does not need to consume energy in the project construction process, simplifies the development steps, lightens the project development difficulty, saves time and labor, and is not easy to generate errors.

Description

Front-end project construction method and device
Technical Field
The invention relates to the technical field of computers, in particular to a front-end project construction method and device.
Background
The front-end development is a process of creating a front-end interface such as a Web page or app and the like and presenting the front-end interface to a user, and user interface interaction of an internet product is realized through HTML, CSS and JavaScript and various derived technologies, frames and solutions. A product with a highly centralized brand concept has a certain harmonious and unified UI (User Interface Design) page. When the front-end projects realize the pages, the pages are not required to be reused due to similar page lengths, and when the front-end pages are constructed in the prior art, in order to solve the problems, the original code mode is generally referred by hands, so that the method is time-consuming and labor-consuming, and errors are easy to occur.
Disclosure of Invention
The embodiment of the invention provides a front-end project construction method, which does not need to consume energy in the project construction process, simplifies the development steps, lightens the project development difficulty, saves time and labor, and is not easy to generate errors, and the method comprises the following steps:
receiving a construction request of a front-end project;
determining a target project template according to the construction request;
generating a project code according to the target project template, and generating a code dependence according to the project code;
acquiring a preset code, and processing the preset code according to code dependence to acquire a preset target code;
and constructing a preset front-end project according to the preset target code.
Optionally, determining the target project template according to the construction request includes:
comparing the construction request with each preset template in the preset project templates, and judging whether the construction request matched with the preset template exists or not;
if the construction request matched with the preset template exists, directly outputting the preset template as a target template, otherwise, outputting a setting interface of the project template;
and receiving the output target template, and generating all project templates matched with the construction request as target project templates.
Optionally, the obtaining a preset code, and processing the preset code according to the code dependency to obtain a preset target code includes:
performing code segmentation on a preset code to generate a segmentation code;
merging the module code files corresponding to the split codes to generate merged code files;
and compressing the combined code file to generate a preset target code.
Optionally, after the preset front-end item is constructed according to the preset object code, the method further includes:
performing man-machine interaction aiming at a preset front-end project, and judging whether the preset front-end project meets the requirement;
and acquiring a front-end project according to the judgment result.
The embodiment of the invention also provides a front-end project construction device, which does not need to consume energy in the project construction process, simplifies the development steps, lightens the project development difficulty, saves time and labor, and is not easy to generate errors, and the device comprises:
the construction request receiving module is used for receiving a construction request of a front-end project;
the project template determining module is used for determining a target project template according to the construction request;
the code dependence generation module is used for generating a project code according to the target project template and generating a code dependence according to the project code;
the preset target code acquisition module is used for acquiring a preset code and processing the preset code according to code dependence so as to acquire the preset target code;
and the preset front-end project construction module is used for constructing a preset front-end project according to the preset target code.
Optionally, the item template determining module is further configured to:
comparing the construction request with each preset template in the preset project templates, and judging whether the construction request matched with the preset template exists or not;
if the construction request matched with the preset template exists, directly outputting the preset template as a target template, otherwise, outputting a setting interface of the project template;
and receiving the output target template, and generating all project templates matched with the construction request as target project templates.
Optionally, the preset object code obtaining module is further configured to:
performing code segmentation on a preset code to generate a segmentation code;
merging the module code files corresponding to the split codes to generate merged code files;
and compressing the combined code file to generate a preset target code.
Optionally, the apparatus further comprises:
the judging module is used for carrying out human-computer interaction aiming at the preset front-end project and judging whether the preset front-end project meets the requirement or not;
and the front-end project construction module is used for acquiring the front-end project according to the judgment result.
The embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program for executing the above method is stored.
In the embodiment of the invention, the construction request of the front-end project is received, and the target project template is determined according to the construction request, so that the error rate of code execution is effectively improved, and the construction efficiency and the error rate of the project are effectively improved. The project codes are generated according to the target project template, the code dependence is generated according to the project codes, the preset codes are obtained, and the preset codes are processed according to the code dependence to obtain the preset target codes, so that the generation speed of the configuration file can be increased, energy consumption in the project construction process is avoided, the development steps are simplified, the project development difficulty is reduced, time and labor are saved, and errors are not easy to occur.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
FIG. 1 is a flowchart of a front-end project construction method according to an embodiment of the present invention;
FIG. 2 is a flow chart of determining a target project template in an embodiment of the present invention;
FIG. 3 is a flowchart illustrating an embodiment of obtaining a predetermined object code;
FIG. 4 is a flowchart of obtaining front-end items in an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a front-end project building apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a front-end item acquisition according to an embodiment of the present invention;
FIG. 7 is a diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 is a flowchart of a front-end project building method according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
step 101, receiving a construction request of a front-end project.
And 102, determining a target project template according to the construction request.
In an embodiment, the target project template is an output customer-desired project template. The project template includes a start template, an initial page template, a style template, and a configuration template.
And 103, generating a project code according to the target project template, and generating a code dependency according to the project code.
Specifically, the dependency separation of the project code can be performed based on the software package management system, and the code dependency is obtained.
And 104, acquiring a preset code, and processing the preset code according to the code dependence to acquire a preset target code.
And 105, constructing a preset front-end project according to the preset target code.
As can be seen from fig. 1, in the front-end project construction method provided in the embodiment of the present invention, by receiving a construction request of a front-end project, and determining a target project template according to the construction request, an error rate of code execution is effectively improved, and construction efficiency and an error rate of the project are effectively improved. The project codes are generated according to the target project template, the code dependence is generated according to the project codes, the preset codes are obtained, and the preset codes are processed according to the code dependence to obtain the preset target codes, so that the generation speed of the configuration file can be increased, energy consumption in the project construction process is avoided, the development steps are simplified, the project development difficulty is reduced, time and labor are saved, and errors are not easy to occur.
Fig. 2 is a flowchart of determining a target project template according to an embodiment of the present invention, and as shown in fig. 2, the determining a target project template according to a construction request includes:
step 201, comparing the construction request with each preset template in the preset project templates, and judging whether a construction request matched with the preset template exists.
Step 202, if a construction request matched with a preset template exists, directly outputting the preset template as a target template, otherwise, outputting a setting interface of the project template; specifically, if there is no construction request matching with the preset templates, a setting interface of the project template is output, so that the developer selects a required target template from each preset template.
And step 203, receiving the output target template, and generating all project templates matched with the construction request as target project templates.
Fig. 3 is a flowchart of acquiring a preset object code according to an embodiment of the present invention, and as shown in fig. 3, acquiring the preset code and processing the preset code according to code dependency to acquire the preset object code includes:
step 301, performing code segmentation on a preset code to generate a segmentation code;
step 302, merging module code files corresponding to the split codes to generate merged code files;
and step 303, compressing the combined code file to generate a preset target code.
Fig. 4 is a flowchart of acquiring a front-end project according to an embodiment of the present invention, and in order to further reduce the error rate of the project and obtain a software front-end project required by a developer, as shown in fig. 4, after a preset front-end project is constructed according to a preset object code, the method further includes:
step 401, performing human-computer interaction aiming at a preset front-end project, and judging whether the preset front-end project meets requirements;
and step 402, acquiring a front-end item according to the judgment result.
During specific implementation, man-machine interaction is carried out, and developers are inquired whether front-end projects meet requirements or not;
if the requirements are met, continuously inquiring whether other customization requirements are needed, if so, obtaining the project with the customization function according to the customization requirements, and outputting the obtained front-end project;
if the developer selects no, directly outputting to obtain the required front-end project;
and if the front-end project does not meet the requirement, changing the project, and continuing to perform human-computer interaction until the required front-end project is obtained.
The man-machine interaction refers to the process of information exchange between a person and a computer for completing a determined task in a certain interaction mode by using a certain dialogue language between the person and the computer. The human-computer interaction in the embodiment can be interactive question answering, the interactive question answering is an information processing mode with interaction between developers and a server, the processing process can be that the developers input information and operation commands through the server, the server immediately processes the information and the operation commands after receiving the information, and interactive question answering results are displayed through terminal equipment; the server can also display the current selectable interactive questions and answers through the terminal equipment, and developers click or touch to determine interactive question and answer results.
The specific implementation mode of the man-machine interaction can be set according to the actual situation, the interactive question and answer processing mode has the advantages of flexibility, intuition and convenience in control, the development time can be saved, and the development efficiency of developers can be improved.
Based on the same inventive concept, the embodiment of the present invention further provides a front-end project building apparatus, as described in the following embodiments. Because the principle of the front-end project construction device for solving the problems is similar to that of the front-end project construction method, the implementation of the front-end project construction device can refer to the implementation of the front-end project construction method, and repeated parts are not described again. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a schematic structural diagram of a front-end project building apparatus according to an embodiment of the present invention, as shown in fig. 5, the apparatus includes:
a construction request receiving module 501, configured to receive a construction request of a front-end project;
a project template determination module 502, configured to determine a target project template according to the construction request;
a code dependency generation module 503, configured to generate a project code according to the target project template, and generate a code dependency according to the project code;
a preset target code obtaining module 504, which obtains a preset code and processes the preset code according to code dependence to obtain a preset target code;
a preset front-end project building module 505, configured to build a preset front-end project according to the preset target code.
In an embodiment of the present invention, the project template determination module 502 is further configured to:
comparing the construction request with each preset template in the preset project templates, and judging whether the construction request matched with the preset template exists or not;
if the construction request matched with the preset template exists, directly outputting the preset template as a target template, otherwise, outputting a setting interface of the project template;
and receiving the output target template, and generating all project templates matched with the construction request as target project templates.
In this embodiment of the present invention, the preset object code obtaining module 504 is further configured to:
performing code segmentation on a preset code to generate a segmentation code;
merging the module code files corresponding to the split codes to generate merged code files;
and compressing the combined code file to generate a preset target code.
Fig. 6 is a schematic structural diagram of acquiring a front-end item according to an embodiment of the present invention, and as shown in fig. 6, the apparatus further includes:
the judging module 601 is configured to perform human-computer interaction for a preset front-end item, and judge whether the preset front-end item meets requirements;
a front-end project building module 602, configured to obtain a front-end project according to the determination result.
To achieve the above object, according to another aspect of the present application, there is also provided a computer apparatus. As shown in fig. 7, the computer device comprises a memory, a processor, a communication interface and a communication bus, wherein a computer program that can be run on the processor is stored in the memory, and the steps of the method of the above embodiment are realized when the processor executes the computer program.
The processor may be a Central Processing Unit (CPU). The Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or a combination thereof.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and units, such as the corresponding program units in the above-described method embodiments of the present invention. The processor executes various functional applications of the processor and the processing of the work data by executing the non-transitory software programs, instructions and modules stored in the memory, that is, the method in the above method embodiment is realized.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor, and the like. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and such remote memory may be coupled to the processor via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more units are stored in the memory and when executed by the processor perform the method of the above embodiments.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program for executing the above method is stored.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A front-end project construction method is characterized by comprising the following steps:
receiving a construction request of a front-end project;
determining a target project template according to the construction request;
generating a project code according to the target project template, and generating a code dependence according to the project code;
acquiring a preset code, and processing the preset code according to code dependence to acquire a preset target code;
and constructing a preset front-end project according to the preset target code.
2. The method of claim 1, wherein determining a target project template from a build request comprises:
comparing the construction request with each preset template in the preset project templates, and judging whether the construction request matched with the preset template exists or not;
if the construction request matched with the preset template exists, directly outputting the preset template as a target template, otherwise, outputting a setting interface of the project template;
and receiving the output target template, and generating all project templates matched with the construction request as target project templates.
3. The method of claim 1, wherein obtaining the predetermined code and processing the predetermined code according to the code dependency to obtain the predetermined object code comprises:
performing code segmentation on a preset code to generate a segmentation code;
merging the module code files corresponding to the split codes to generate merged code files;
and compressing the combined code file to generate a preset target code.
4. The method of claim 1, wherein after constructing the preset front-end item according to the preset object code, the method further comprises:
performing man-machine interaction aiming at a preset front-end project, and judging whether the preset front-end project meets the requirement;
and acquiring a front-end project according to the judgment result.
5. A front-end item building apparatus, comprising:
the construction request receiving module is used for receiving a construction request of a front-end project;
the project template determining module is used for determining a target project template according to the construction request;
the code dependence generation module is used for generating a project code according to the target project template and generating a code dependence according to the project code;
the preset target code acquisition module is used for acquiring a preset code and processing the preset code according to code dependence so as to acquire the preset target code;
and the preset front-end project construction module is used for constructing a preset front-end project according to the preset target code.
6. The apparatus of claim 5, wherein the item template determination module is further to:
comparing the construction request with each preset template in the preset project templates, and judging whether the construction request matched with the preset template exists or not;
if the construction request matched with the preset template exists, directly outputting the preset template as a target template, otherwise, outputting a setting interface of the project template;
and receiving the output target template, and generating all project templates matched with the construction request as target project templates.
7. The apparatus of claim 5, wherein the preset object code acquisition module is further to:
performing code segmentation on a preset code to generate a segmentation code;
merging the module code files corresponding to the split codes to generate merged code files;
and compressing the combined code file to generate a preset target code.
8. The apparatus of claim 5, wherein the apparatus further comprises:
the judging module is used for carrying out human-computer interaction aiming at the preset front-end project and judging whether the preset front-end project meets the requirement or not;
and the front-end project construction module is used for acquiring the front-end project according to the judgment result.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 4.
CN202011039295.5A 2020-09-28 2020-09-28 Front-end project construction method and device Pending CN112099794A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011039295.5A CN112099794A (en) 2020-09-28 2020-09-28 Front-end project construction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011039295.5A CN112099794A (en) 2020-09-28 2020-09-28 Front-end project construction method and device

Publications (1)

Publication Number Publication Date
CN112099794A true CN112099794A (en) 2020-12-18

Family

ID=73783681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011039295.5A Pending CN112099794A (en) 2020-09-28 2020-09-28 Front-end project construction method and device

Country Status (1)

Country Link
CN (1) CN112099794A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106843869A (en) * 2017-01-16 2017-06-13 百融(北京)金融信息服务股份有限公司 A kind of front end Development Engineering system and method
CN109739478A (en) * 2018-12-24 2019-05-10 网易(杭州)网络有限公司 Front end project automated construction method, device, storage medium and electronic equipment
WO2020173128A1 (en) * 2019-02-27 2020-09-03 平安科技(深圳)有限公司 Method and device for generating software development kit, and terminal device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106843869A (en) * 2017-01-16 2017-06-13 百融(北京)金融信息服务股份有限公司 A kind of front end Development Engineering system and method
CN109739478A (en) * 2018-12-24 2019-05-10 网易(杭州)网络有限公司 Front end project automated construction method, device, storage medium and electronic equipment
WO2020173128A1 (en) * 2019-02-27 2020-09-03 平安科技(深圳)有限公司 Method and device for generating software development kit, and terminal device

Similar Documents

Publication Publication Date Title
EP3842948B1 (en) Method and apparatus for testing edge computing, device, and readable storage medium
CN109739478B (en) Front-end project automatic construction method and device, storage medium and electronic equipment
CN110599874A (en) Programming method and device of robot controller, computer equipment and storage medium
CN112130993B (en) Electric power edge internet of things proxy edge calculation method and system based on graphical modeling
CN108898229B (en) Method and system for constructing machine learning modeling process
CN114091688A (en) Computing resource obtaining method and device, electronic equipment and storage medium
CN113806038A (en) Task scheduling method, device, electronic equipment, storage medium and program product
CN110287171B (en) Data processing method and system
CN106843822B (en) Execution code generation method and equipment
CN112099794A (en) Front-end project construction method and device
CN115469849B (en) Service processing system, method, electronic equipment and storage medium
JP2008293186A (en) Method and apparatus for automatically generating steel plant control program
CN110895460A (en) Jenkins-based robot system integration method and device and terminal equipment
CN111221898B (en) Data visualization method based on browser
CN112346736A (en) Data processing method and system
CN108960433B (en) Method and system for running machine learning modeling process
CN112367205A (en) Processing method and scheduling system for HTTP scheduling request
US8694293B2 (en) Simulation support method, computer-readable storage medium storing simulation support program, and simulation support apparatus
CN110928672A (en) Task arranging method, device and equipment and storage medium
CN110851200A (en) Animation response type driving method and device and electronic equipment
CN112394972A (en) Cloud application publishing method, device, equipment and storage medium
CN115952376B (en) Webpage access method and device, electronic equipment and storage medium
CN110647314A (en) Skill generation method and device and electronic equipment
CN113469284B (en) Data analysis method, device and storage medium
CN108614731B (en) Method, device and system for operating MapReduce operation

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