CN109271161A - Template code generating method, device and storage equipment and computer equipment - Google Patents
Template code generating method, device and storage equipment and computer equipment Download PDFInfo
- Publication number
- CN109271161A CN109271161A CN201810947326.3A CN201810947326A CN109271161A CN 109271161 A CN109271161 A CN 109271161A CN 201810947326 A CN201810947326 A CN 201810947326A CN 109271161 A CN109271161 A CN 109271161A
- Authority
- CN
- China
- Prior art keywords
- code
- template
- template code
- object module
- module
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000009471 action Effects 0.000 claims abstract description 51
- 230000015654 memory Effects 0.000 claims description 30
- 238000012790 confirmation Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 6
- 238000012217 deletion Methods 0.000 claims description 4
- 230000037430 deletion Effects 0.000 claims description 4
- 238000011161 development Methods 0.000 abstract description 5
- 238000011160 research Methods 0.000 description 20
- 230000006870 function Effects 0.000 description 17
- 238000012986 modification Methods 0.000 description 13
- 230000004048 modification Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 9
- 230000006399 behavior Effects 0.000 description 5
- 230000008901 benefit Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 206010054949 Metaplasia Diseases 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 239000003795 chemical substances by application Substances 0.000 description 2
- 230000015689 metaplastic ossification Effects 0.000 description 2
- 230000008439 repair process Effects 0.000 description 2
- 238000012827 research and development Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- VOZKAJLKRJDJLL-UHFFFAOYSA-N 2,4-diaminotoluene Chemical compound CC1=CC=C(N)C=C1N VOZKAJLKRJDJLL-UHFFFAOYSA-N 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000009432 framing Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 230000003362 replicative effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/35—Creation or generation of source code model driven
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Stored Programmes (AREA)
Abstract
The present invention provides a kind of template code generating method, device and storage equipment and computer equipment, which comprises receives the first trigger action for being directed to template code building interface;The corresponding first template code in template code building interface is obtained according to first trigger action;The feature of code structure management object module in template code building interface is obtained, the code structure manages object module to the feature for identification;It is generated according to the feature of the first template code and code structure management object module and manages the matched second template code of object module with the code structure.The template code generating method generates the template code at code administration interface to automate, and improves development efficiency.
Description
Technical field
The present invention relates to code administration technical fields, specifically, the present invention relates to a kind of template code generating methods, dress
Set and store equipment and computer equipment.
Background technique
Website page is generally divided into single-page and applies and multi-page application.Either for single-page application or multi-page
Using in Website page exploitation, technical staff generally can carry out code administration at a visual code administration interface.Base
A template is created every time, code administration interface all not can avoid since front end frame limits for each Website page on this
Some template codes.
For template code necessary to newly-built template, traditional mode is pasted by directly replicating manually, then root
According to needing to make simple modification.This mode is not only troublesome, influences development efficiency, is also easy to appear mistake.
Summary of the invention
The present invention proposes a kind of template code generating method, device and storage equipment and computer equipment, with automatic metaplasia
At the template code at code administration interface, development efficiency is improved.
The present invention provides following scheme:
A kind of template code generating method, comprising: receive the first trigger action for being directed to template code building interface;According to
First trigger action obtains the corresponding first template code in template code building interface;It is raw to obtain the template code
At the feature of code structure management object module in interface, the code structure manages object module to the feature for identification;
It is generated and code structure management pair according to the feature of the first template code and code structure management object module
As the matched second template code of module.
It is described in one of the embodiments, that template code building interface pair is obtained according to first trigger action
The the first template code answered, comprising: identify the front end frame at template code building interface;It is obtained according to the front end frame
The corresponding first template code in template code building interface.
It is described in one of the embodiments, that object module is managed according to the first template code and the code structure
Feature generate with the code structure manage the matched second template code of object module, comprising: according to the code structure
The feature of management object module confirms the block code for needing to modify in the corresponding template code in template code building interface;
The block code modified is needed to modify to described according to the feature that the code structure manages object module, it will be modified
Template code is as the second template code.
It is described in one of the embodiments, that object module is managed according to the first template code and the code structure
Feature generate with the code structure manage the matched second template code of object module, comprising: according to the code structure
The feature of management object module confirms the block code for needing to delete in the corresponding template code in template code building interface;
The block code for needing to delete is deleted according to the feature that the code structure manages object module, by the template generation after deletion
Code is used as the second template code.
The generation manages object module matched second template generation with the code structure in one of the embodiments,
After code, further includes: obtained according to the feature that the code structure manages object module and manage object mould with the code structure
The routing link of the associated correlation module of block generates the routing link of the correlation module at template code building interface.
It is described in one of the embodiments, that template code building interface pair is obtained according to first trigger action
The the first template code answered, comprising: the characteristic of identification first trigger action is obtained according to the characteristic of first trigger action
Take the corresponding first template code in template code building interface.
The generation manages object module matched second template generation with the code structure in one of the embodiments,
After code, further includes: receive the second trigger action for being directed to template code building interface;Identify the second triggering behaviour
Make;The code of respective modules in the matched second template code is deleted according to second trigger action, or according to described
Second trigger action renames the code of respective modules in the second template code.
A kind of template code generating unit, comprising: confirmation module is directed to the first of template code building interface for receiving
Trigger action;First obtains module, corresponding for obtaining template code building interface according to first trigger action
First template code;Second obtains module, manages object module for obtaining code structure in template code building interface
Feature, the code structure manages object module to the feature for identification;Generation module, for according to first template
The feature of code and code structure management object module, which is generated, manages object module matched second with the code structure
Template code.
A kind of storage equipment, is stored thereon with computer program;The computer program is suitable for being loaded and being held by processor
Template code generating method described in any of the above-described embodiment of row.
A kind of computer equipment comprising: one or more processors;Memory;One or more application program, wherein
One or more of application programs are stored in the memory and are configured as being held by one or more of processors
Row, one or more of application programs are configured to carry out the template code building side according to any of the above-described embodiment
Method.
Template code generating method provided by the above embodiment, when template code building interface receives trigger action, i.e.,
It carves and obtains the corresponding first template code in template code building interface.Meanwhile obtain the template code building interface towards
Code structure manages the feature of object module, in conjunction with the feature and template code building circle of code structure management object module
The matched second template code of the corresponding template code building in face.Therefore, which can not only automate
Template code is generated at code administration interface, and the object module feature that can be combined with management generates matched second template
Code, to improve the efficiency and accuracy of page development.
The additional aspect of the present invention and advantage will be set forth in part in the description, these will become from the following description
Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments
Obviously and it is readily appreciated that, in which:
Fig. 1 is the method flow diagram in an a kind of embodiment of template code generating method provided by the invention;
Fig. 2 is the method flow diagram in an embodiment of step S200 of the present invention;
Fig. 3 is the structural framing schematic diagram that the present invention realizes Fig. 2 embodiment;
Fig. 4 is the method flow diagram in a kind of another embodiment of template code generating method provided by the invention;
Fig. 5 is the showing interface schematic diagram of an embodiment at template code building provided by the invention interface;
Method flow diagram in a kind of Fig. 6 another embodiment of template code generating method provided by the invention;
Structural schematic diagram in a kind of Fig. 7 embodiment of template code generating unit provided by the invention;
Fig. 8 is a kind of structural schematic diagram of computer equipment provided by the invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, and for explaining only the invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one
It is a ", " described " and "the" may also comprise plural form, " first " used herein, " second " are only used for distinguishing same technology special
Sign, is not limited the sequence of the technical characteristic and quantity etc..It is to be further understood that in specification of the invention
The wording " comprising " used refers to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that depositing
Or add other one or more features, integer, step, operation, element, component and/or their group.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art
Language and scientific term), there is meaning identical with the general understanding of those of ordinary skill in fields of the present invention.Should also
Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art
The consistent meaning of meaning, and unless idealization or meaning too formal otherwise will not be used by specific definitions as here
To explain.
Refer to that visual code structure administration interface is carrying out pipe to block code in template code of the present invention
When reason, limited based on its front end frame (such as single-page front end frame), the management of each new function module not can avoid
Template code.For example, the front end frame of extensible markup language (eXtensibleMarkupLanguage, XML), template generation
Code generate interface the first row content be "<? xmlversion=" 1.0 " encoding=" UTF-8 "?>", wherein not only including
Template title (such as: " loginDlg "), further include template code (such as: "<base>...</base>").
It is every to establish a new function module for each front end page frame, it is corresponding all not can avoid page framework
Template code.Generally, HTML Developing tool generates the mode of template code, is pasted by developer by duplication, and carry out pair
It should modify, to form the template code adapted to new template.The present invention provides a kind of template code generating method, can automatic metaplasia
At template code, code error caused by pasting due to duplication is reduced, the efficiency of exploitation also can be improved.It should be noted that this
The invention template code generating method is mainly used in single-page front end frame, but is not limited to be applied to single-page front end frame
Frame applies also for multi-page front end frame etc..
In one embodiment, as shown in Figure 1, the template code generating method the following steps are included:
S100 receives the first trigger action for being directed to template code building interface.
Template code building of the present invention interface, for generating template code, and allows research staff to generation
Sample code carry out edit-modify.Meanwhile after template code of the research staff to generation carries out edit-modify, sample code
Generating interface can be stored in a manner of overriding by modified template code, in order to which subsequent research staff directly adjusts
With, avoid repeat edit and reduce research and development efficiency.
In the present embodiment, HTML Developing tool shows the page including template code building interface to research staff.This
Outside, which may also include the displaying of other operation buttons or other content.Such as, the key of functional module code is transferred,
Debug key and the key of other management codes etc..And the result after debugging code can also be provided and show interface, Yi Jiqi
Displaying interface after his management code.It is managed in research staff using code of the HTML Developing tool to functional module
When, HTML Developing tool detects that template code building interface receives the first trigger action of research staff.Herein first
Trigger action can be research staff and click or double-click template code building interface or research staff in the life of template code
Trigger action is carried out at the specific region at interface, is also possible to trigger the specific keys at template code building interface.
S200 obtains the corresponding first template code in template code building interface according to first trigger action.
After HTML Developing tool receives first trigger action at template code building interface, according to first triggering
Operation obtains the corresponding first template code in template code building interface.Specifically, template code building interface corresponding
One template code is storable in the template code means embodied therein library of system.Template code means embodied therein library may include a variety of template codes with
And the corresponding template title of template code.Template code building interface, which can be, is directly obtained corresponding template code, can also
To be to identify template title according to trigger action, to transfer corresponding template code according to template title.HTML Developing tool
After receiving first trigger action, corresponding first template code is transferred from the template code means embodied therein library of system.
In one embodiment, as shown in Fig. 2, step S200 comprising steps of
S210 identifies the front end frame at template code building interface.
S230 obtains the corresponding first template code in template code building interface according to the front end frame.
In the present embodiment, for the project of more frames, template code building interface identifies page front end frame,
The template code of the page front end frame is obtained from template code means embodied therein library.Template code at this time is just for current page
End frame in front can be adapted for the module of multiple functions generated under the frame.
Specifically, as shown in figure 3, the template code building interface 10 of front end corresponding front end frame in technology realization
Frame includes template code means embodied therein library 20 in the background system memory space of HTML Developing tool.It uses in template code means embodied therein library 20
In the template code for storing each front end frame.For example, as shown in figure 3, template code means embodied therein library 20 is corresponding including front end frame 1
Template code, the corresponding template code of corresponding template code ... the front end frame N of front end frame 2.Generating template code
When, HTML Developing tool identifies the front end frame at template code building interface 10, according to the front end frame identified from
The template code of corresponding front end frame is matched in template code means embodied therein library 20, while matched template code is returned into template generation
Code generates interface 10.
In one embodiment, step S200 includes: the characteristic for identifying first trigger action, according to first triggering
The characteristic of operation obtains the corresponding first template code in template code building interface.In this embodiment, the first triggering behaviour
Purpose behavior of the user (research staff of the present invention) to template code building interface for identification of the characteristic of work.Such as, it uses
Template code building interface is clicked at family, indicates to generate the corresponding template code in template code building interface.User's long-pressing
The template code of template code building showing interface is selected, indicates to delete the code for choosing part.First triggering of different characteristics
Operation, HTML Developing tool execute different operations.Knowledge of the HTML Developing tool to the first trigger action characteristic in the present embodiment
Not, to generate the corresponding first template code in template code building interface.
S300, obtains the feature of code structure management object module in template code building interface, and the feature is used
Object module is managed in the identification code structure.
The module that a new function is generated in page front end frame, needs to get corresponding template code.In this reality
It applies in example, there is a type of template code at the interface that template code building interface corresponds to itself.In addition, for each newly-built
Functional module also has its corresponding sample code.In order to which the code administration to newly-built functional module, step S200 is better achieved
In the corresponding template code in the template code building interface that gets need to manage the function that object module is realized according to code structure
The purpose of energy or code structure management object module is modified accordingly, and such as the modification of head function, the modification of parameter is ordered again
The modification etc. of name, so that modified template code meets newly-built functional module.That is, generating the newly-built corresponding template of module
Code.
In this step, HTML Developing tool obtains the feature for the code structure management object module that will be created.Herein
Feature be code structure manage object module characteristic feature, according to this feature can identify code structure manage object mould
Block, so that HTML Developing tool can manage the feature of object module according to code structure, it is corresponding to template code building interface
Template code is modified, and manages the matched template code of object module with code structure to generate.
S400 is generated and the generation according to the feature of the first template code and code structure management object module
The code matched second template code of structure management object module.
In the present embodiment, the corresponding first template code in HTML Developing tool combination template code building interface and generation
The feature of code structure management object module, generates and manages the matched second template code of object module with code structure.Specifically,
The corresponding first template code in template code building interface is the foundation code that may operate under the interface.However, different function
Energy module also needs to carry out the template code modification of adaptability, to generate the template code being adapted to functional module.
In a particular embodiment, HTML Developing tool can manage the spy of object module according to the code structure
Sign, identifies the functional character of the module.According to the functional characteristic of the module to the corresponding sample in template code building interface
Plate code is modified, or automation increases the corresponding code of the functional characteristic, to generate code structure management object mould
Second template code of Block- matching.
In one embodiment, step S400 includes: according to the feature confirmation of code structure management object module
The block code for needing to modify in the corresponding template code in template code building interface;Object mould is managed according to the code structure
The feature of block needs the block code modified to modify to described, using modified template code as the second template generation
Code.In this embodiment, HTML Developing tool identifies template code building according to the feature that code structure manages object module
In the corresponding first template code in interface, the code modified according to this feature is needed, while automatically according to this feature
Modify to the corresponding first template code in template code building interface, and using modified template code as with code knot
Structure manages the matched second template code of object module.
In one embodiment, step S400 includes: according to the feature confirmation of code structure management object module
The block code for needing to delete in the corresponding template code in template code building interface;Object mould is managed according to the code structure
The feature of block deletes the block code for needing to delete, using the template code after deletion as the second template code.?
In the embodiment, HTML Developing tool identifies template code building interface pair according to the feature that code structure manages object module
In the first template code answered, the block code deleted according to this feature is needed, while automatically according to this feature by template
The block code for needing to delete in the corresponding first template code in code building interface is deleted, and will be deleted respective modules generation
Template code after code manages the matched second template code of object module as with code structure.
Template code generating method provided by the above embodiment, when template code building interface receives trigger action, i.e.,
It carves and obtains the corresponding first template code in template code building interface.Meanwhile obtain the template code building interface towards
Code structure manages the feature of object module, in conjunction with the feature and template code building circle of code structure management object module
The matched second template code of the corresponding template code building in face.Therefore, which can not only automate
Template code is generated at code administration interface, and the object module feature that can be combined with management generates matched template generation
Code, to improve the efficiency and accuracy of page development.
In one embodiment, as shown in figure 4, being further comprised the steps of: after step S400
S500 is obtained according to the feature that the code structure manages object module and is managed object module with the code structure
The routing link of associated correlation module generates the routing link of the correlation module at template code building interface.
In this embodiment, as shown in figure 5, template code building interface 10 according to step S100 to step S400 in template
It is generated in code building region 11 after managing the matched second template code of object module with code structure, further according to generation
The feature of code structure management object module obtains the routing link 13 for the correlation module being associated, and in template code building circle
The routing link 13 of the correlation module is generated in face, to show the link for jump module to research staff.
In a specific embodiment, in web page tools increase routing link displaying with jump.All moulds of exploration project
Block is separated according to catalogue, and the page of each module possesses the routing rule of oneself again.When multi agent cooperation, exploitation
The page of person A maintenance, developer B do not know the routing address of the A page, can only can just be learnt by way of browsing source code, than
It is cumbersome.Therefore, template code building interface generates the link of the correlation module, when research staff's clickthrough,
Backstage automatically parses source code, will link corresponding routing address and generate, increase jumps, and facilitates multi agent cooperation.
In one embodiment, as shown in fig. 6, being further comprised the steps of: after step S400
S600 receives the second trigger action for being directed to template code building interface.
S700 identifies second trigger action.
S800 deletes the code of respective modules in the matched second template code according to second trigger action,
Or it is renamed according to code of second trigger action to respective modules in the second template code.
In this embodiment, template code building interface generates the second template with code structure management object matching
After code, when research staff needs to edit the matched second template code, template code building interface is carried out
Second trigger action.HTML Developing tool identifies the second trigger action.If the second triggering behaviour recognized is deletion institute
The instruction for stating the code of respective modules in matched second template code, then delete the code of the respective modules.If recognizing
Second triggering behaviour then executes to the correspondence to rename to the code of respective modules in the matched second template code
The code of module renames.
The present invention also provides a kind of template code generating units.As shown in fig. 7, the template code generating unit includes confirmation
Module 100, first obtains module 200, second and obtains module 300 and generation module 400.
Confirmation module 100 is used to receive the first trigger action for template code building interface.Sample of the present invention
Plate code building interface for the template code of generation, and allows research staff to carry out editor to the sample code of generation and repairs
Change.Meanwhile after template code of the research staff to generation carries out edit-modify, sample code generates interface can also be to modification
Template code afterwards is stored in a manner of overriding, and in order to which subsequent research staff calls directly, avoids repeating to edit and drop
The efficiency of low research and development.
In the present embodiment, HTML Developing tool shows the page including template code building interface to research staff.This
Outside, which may also include other operation buttons or other content is shown.Such as, the key of functional module code is transferred, is adjusted
Try key and the key of other management codes etc..And can also be provided the result after debugging code show interface and other
Displaying interface after management code.When research staff is managed using code of the HTML Developing tool to functional module,
HTML Developing tool detects that template code building interface receives the first trigger action of research staff.The first triggering herein
Operation can be research staff and click or double-click template code building interface or research staff in template code building circle
The specific region in face carries out trigger action, can also trigger the specific key at template code building interface.
First obtains module 200 for corresponding according to first trigger action acquisition template code building interface
First template code.After HTML Developing tool receives first trigger action at template code building interface, according to described
One trigger action obtains the corresponding first template code in template code building interface.Specifically, template code building interface pair
The the first template code answered is storable in the template code means embodied therein library of system.Template code means embodied therein library may include a variety of templates
Code and the corresponding template title of template code.Template code building interface, which can be, is directly obtained corresponding template generation
Code is also possible to identify template title according to trigger action, to transfer corresponding template code according to template title.Webpage is opened
After hair tool receives first trigger action, corresponding second template generation is transferred from the template code means embodied therein library of system
Code.
Second acquisition module 300 is used to obtain the spy of code structure management object module in template code building interface
Sign, the code structure manages object module to the feature for identification.A new function is generated in page front end frame
Module needs to get corresponding template code.In the present embodiment, the interface that template code building interface corresponds to itself has one
The template code of seed type.In addition, also having its corresponding sample code for each newly-built functional module.In order to preferably
Realize the code administration to newly-built functional module, the template code building interface got in the first acquisition module 200 is corresponding
Template code needs to manage the purpose of the function that object module is realized or code structure management object module according to code structure
It is modified accordingly, such as the modification of head function, the modification of parameter, the modification etc. of renaming, so that modified template generation
Code symbol closes newly-built functional module.That is, generating the newly-built corresponding template code of module.
In this embodiment, HTML Developing tool obtains the feature for the code structure management object module that will be created.This
The feature at place is the characteristic feature that code structure manages object module, can identify that code structure manages object according to this feature
Module, thus, HTML Developing tool can manage the feature of object module according to code structure, corresponding to template code building interface
Template code modify, with generate with code structure manage the matched template code of object module.
Generation module 400 is used for raw according to the feature of the first template code and code structure management object module
The matched second template code of object module is managed at the code structure.In the present embodiment, HTML Developing tool combines
The feature of the corresponding first template code in template code building interface and code structure management object module, generates code structure
Manage the matched second template code of object module.Specifically, the corresponding first template code in template code building interface be can
Operate in the foundation code under the interface.However, different functional modules also needs to carry out adaptability to the template code to repair
Change, to generate the template code being adapted to functional module.
In a particular embodiment, HTML Developing tool can manage the spy of object module according to the code structure
Sign, identifies the functional character of the module.According to the functional characteristic of the module to the corresponding sample in template code building interface
Plate code is modified, or automation increases the corresponding code of the functional characteristic, manages object with the code structure to generate
Second template code of the matched template code of module.
In other embodiments, the modules in template code generating unit provided by the invention are also used to execute this hair
In the bright template code generating method, the operation that corresponding each step executes no longer is described in detail herein.
The present invention also provides a kind of storage mediums.Computer program is stored on the storage medium;The computer program
When being executed by processor, template code generating method described in any of the above-described embodiment is realized.The storage medium can be storage
Device.For example, built-in storage or external memory, or including both built-in storage and external memory.Built-in storage may include only
It reads memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), fast
Flash memory or random access memory.External memory may include hard disk, floppy disk, ZIP disk, USB flash disk, tape etc..Institute of the invention is public
The storage medium opened includes but is not limited to the memory of these types.Memory disclosed in this invention is only used as example rather than makees
To limit.
The present invention also provides a kind of computer equipments.A kind of computer equipment includes: one or more processors;Storage
Device;One or more application program.Wherein one or more of application programs are stored in the memory and are configured
To be executed by one or more of processors, one or more of application programs are configured to carry out any of the above-described embodiment
The template code generating method.
Fig. 8 is the structural schematic diagram of the computer equipment in one embodiment of the invention.Computer equipment described in the present embodiment
It can be server, personal computer and the network equipment.As shown in figure 8, equipment include processor 803, it is memory 805, defeated
Enter the devices such as unit 808 and display unit 809.It will be understood by those skilled in the art that the device structure device shown in Fig. 8 is simultaneously
The restriction to all devices is not constituted, may include than illustrating more or fewer components, or the certain components of combination.Memory
805 can be used for storing application program 801 and each functional module, and processor 803 runs the application program for being stored in memory 805
801, thereby executing the various function application and data processing of equipment.Memory can be built-in storage or external memory, or
Person includes both built-in storage and external memory.Built-in storage may include read-only memory (ROM), programming ROM (PROM),
Electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory or random access memory.External storage
Device may include hard disk, floppy disk, ZIP disk, USB flash disk, tape etc..Memory disclosed in this invention includes but is not limited to these types
Memory.Memory disclosed in this invention is only used as example rather than as restriction.
Input unit 808 is used to receive the input of signal, and receives the keyword of user's input.Input unit 808 can
Including touch panel and other input equipments.Touch panel collects the touch operation of user on it or nearby and (for example uses
Family uses the operations of any suitable object or attachment on touch panel or near touch panel such as finger, stylus), and root
According to the corresponding attachment device of preset driven by program;Other input equipments can include but is not limited to physical keyboard, function
One of key (such as broadcasting control button, switch key etc.), trace ball, mouse, operating stick etc. are a variety of.Display unit
809 can be used for showing the information of user's input or be supplied to the information of user and the various menus of computer equipment.Display is single
The forms such as liquid crystal display, Organic Light Emitting Diode can be used in member 809.Processor 803 is the control centre of computer equipment, benefit
With the various pieces of various interfaces and the entire computer of connection, by running or executing the software being stored in memory 803
Program and/or module, and the data being stored in memory are called, perform various functions and handle data.
In one embodiment, equipment includes one or more processors 803, and one or more memories 805, and one
A or multiple application programs 801.Wherein one or more of application programs 801 are stored in memory 805 and are configured
To be executed by one or more of processors 803, one or more of application programs 801 are configured to carry out the above implementation
Template code generating method described in example.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module
It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould
Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as
Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer
In read/write memory medium.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, which can store in a computer-readable storage medium
In matter, storage medium may include memory, disk or CD etc..
The above is only some embodiments of the invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
It should be understood that each functional unit in various embodiments of the present invention can be integrated in a processing module,
It can be physically existed alone, can also be integrated in two or more units in a module with each unit.It is above-mentioned integrated
Module both can take the form of hardware realization, can also be realized in the form of software function module.
The above is only some embodiments of the invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (10)
1. a kind of template code generating method characterized by comprising
Receive the first trigger action for being directed to template code building interface;
The corresponding first template code in template code building interface is obtained according to first trigger action;
The feature of code structure management object module in template code building interface is obtained, the feature is described for identification
Code structure manages object module;
It is generated and the code structure pipe according to the feature of the first template code and code structure management object module
Manage the matched second template code of object module.
2. the method according to claim 1, wherein described obtain the template according to first trigger action
The corresponding first template code in code building interface, comprising:
Identify the front end frame at template code building interface;
The corresponding first template code in template code building interface is obtained according to the front end frame.
3. the method according to claim 1, wherein described according to the first template code and the code knot
The feature that structure manages object module, which is generated, manages the matched second template code of object module with the code structure, comprising:
The corresponding template code in feature confirmation template code building interface of object module is managed according to the code structure
The middle block code for needing to modify;
It needs the block code modified to modify to described according to the feature that the code structure manages object module, will modify
Template code afterwards is as the second template code.
4. the method according to claim 1, wherein described according to the first template code and the code knot
The feature that structure manages object module, which is generated, manages the matched second template code of object module with the code structure, comprising:
The corresponding template code in feature confirmation template code building interface of object module is managed according to the code structure
The middle block code for needing to delete;
The block code for needing to delete is deleted according to the feature that the code structure manages object module, by the sample after deletion
Plate code is as the second template code.
5. the method according to claim 1, wherein the generation manages object module with the code structure
After the second template code matched, further includes:
It is obtained according to the feature that the code structure manages object module and manages the associated phase of object module with the code structure
The routing link for closing module, generates the routing link of the correlation module at template code building interface.
6. the method according to claim 1, wherein described obtain the template according to first trigger action
The corresponding first template code in code building interface, comprising:
The characteristic for identifying first trigger action obtains the template code building according to the characteristic of first trigger action
The corresponding first template code in interface.
7. the method according to claim 1, wherein the generation manages object module with the code structure
After the second template code matched, further includes:
Receive the second trigger action for being directed to template code building interface;
Identify second trigger action;
The code of respective modules in the matched second template code is deleted according to second trigger action, or according to described
Second trigger action renames the code of respective modules in the second template code.
8. a kind of template code generating unit characterized by comprising
Confirmation module, for receiving the first trigger action for being directed to template code building interface;
First obtains module, for obtaining corresponding first sample in template code building interface according to first trigger action
Plate code;
Second obtains module, for obtaining the feature of code structure management object module in template code building interface, institute
State the feature code structure management object module for identification;
Generation module, the feature for managing object module according to the first template code and the code structure generates and institute
State the code structure management matched second template code of object module.
9. a kind of storage equipment, which is characterized in that be stored thereon with computer program;The computer program is suitable for by processor
Template code generating method described in any one of loading and execute the claims 1 to 7.
10. a kind of computer equipment, characterized in that it comprises:
One or more processors;
Memory;
One or more application program, wherein one or more of application programs are stored in the memory and are configured
To be executed by one or more of processors, one or more of application programs are configured to carry out according to claim 1
To 7 described in any item template code generating methods.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810947326.3A CN109271161B (en) | 2018-08-20 | 2018-08-20 | Template code generation method and device, storage device and computer device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810947326.3A CN109271161B (en) | 2018-08-20 | 2018-08-20 | Template code generation method and device, storage device and computer device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109271161A true CN109271161A (en) | 2019-01-25 |
CN109271161B CN109271161B (en) | 2024-06-04 |
Family
ID=65153860
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810947326.3A Active CN109271161B (en) | 2018-08-20 | 2018-08-20 | Template code generation method and device, storage device and computer device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109271161B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110083340A (en) * | 2019-03-19 | 2019-08-02 | 深圳壹账通智能科技有限公司 | Code generating method, device, computer equipment and storage medium |
CN112394937A (en) * | 2019-08-19 | 2021-02-23 | 北京新能源汽车股份有限公司 | Embedded code generation method and device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080127040A1 (en) * | 2006-08-31 | 2008-05-29 | Jon Barcellona | Enterprise-Scale Application Development Framework Utilizing Code Generation |
US20100287528A1 (en) * | 2009-05-07 | 2010-11-11 | Sap Ag | Systems and Methods for Modifying Code Generation Templates |
CN103019742A (en) * | 2012-12-31 | 2013-04-03 | 清华大学 | Method for generating automatic codes on multiple DSP (Digital Signal Processor) platform |
CN103135976A (en) * | 2011-11-30 | 2013-06-05 | 阿里巴巴集团控股有限公司 | Code automatic generation method and device |
CN104331285A (en) * | 2014-10-30 | 2015-02-04 | 北京思特奇信息技术股份有限公司 | Automatic code generation method and system |
CN105095304A (en) * | 2014-05-19 | 2015-11-25 | 华为技术有限公司 | Log template generation method and equipment |
CN106528165A (en) * | 2016-11-11 | 2017-03-22 | 深圳中兴网信科技有限公司 | Code generation method and code generation system |
CN107256144A (en) * | 2017-04-28 | 2017-10-17 | 努比亚技术有限公司 | Front and back code automatic generation method, terminal and computer-readable recording medium |
-
2018
- 2018-08-20 CN CN201810947326.3A patent/CN109271161B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080127040A1 (en) * | 2006-08-31 | 2008-05-29 | Jon Barcellona | Enterprise-Scale Application Development Framework Utilizing Code Generation |
US20100287528A1 (en) * | 2009-05-07 | 2010-11-11 | Sap Ag | Systems and Methods for Modifying Code Generation Templates |
CN103135976A (en) * | 2011-11-30 | 2013-06-05 | 阿里巴巴集团控股有限公司 | Code automatic generation method and device |
CN103019742A (en) * | 2012-12-31 | 2013-04-03 | 清华大学 | Method for generating automatic codes on multiple DSP (Digital Signal Processor) platform |
CN105095304A (en) * | 2014-05-19 | 2015-11-25 | 华为技术有限公司 | Log template generation method and equipment |
CN104331285A (en) * | 2014-10-30 | 2015-02-04 | 北京思特奇信息技术股份有限公司 | Automatic code generation method and system |
CN106528165A (en) * | 2016-11-11 | 2017-03-22 | 深圳中兴网信科技有限公司 | Code generation method and code generation system |
CN107256144A (en) * | 2017-04-28 | 2017-10-17 | 努比亚技术有限公司 | Front and back code automatic generation method, terminal and computer-readable recording medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110083340A (en) * | 2019-03-19 | 2019-08-02 | 深圳壹账通智能科技有限公司 | Code generating method, device, computer equipment and storage medium |
CN112394937A (en) * | 2019-08-19 | 2021-02-23 | 北京新能源汽车股份有限公司 | Embedded code generation method and device |
Also Published As
Publication number | Publication date |
---|---|
CN109271161B (en) | 2024-06-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108363587B (en) | Application program operation monitoring method and device, computer equipment and storage medium | |
US7930636B2 (en) | Systems, methods and computer products to automatically complete a GUI task | |
US8504803B2 (en) | System and method for creating and executing portable software | |
CN101373431B (en) | Enhanced widget composition platform | |
US8473914B2 (en) | Semi-automated update of application test scripts | |
KR101120301B1 (en) | Persistent saving portal | |
US20170192873A1 (en) | Upgrade verification tool | |
CN109446218A (en) | SQL statement generation method, device and computer readable storage medium | |
CN107357593A (en) | Source code file construction method, device, electric terminal and readable storage medium storing program for executing | |
US20180081642A1 (en) | Connectors framework | |
AU2016201389A1 (en) | Method and system for process automation in computing | |
CN110941467A (en) | Data processing method, device and system | |
CN110334326B (en) | A kind of method and system for identifying recipe file and being converted into XML file | |
CN102520841A (en) | Collection user interface | |
Buchholz et al. | Design and Implementation of Zeitline: a Forensic Timeline Editor. | |
CN104572067A (en) | Associating a visualization of user interface with source code | |
CN109240661A (en) | A kind of code generating method and device | |
US20150301806A1 (en) | Tentative program code in an editor | |
CN109240692A (en) | A kind of method for building up and system of the web database exploitation based on common template | |
Whiting et al. | Creating an iPhone application for collecting continuous ABC data | |
US20060101392A1 (en) | Strongly-typed UI automation model generator | |
CN108491326A (en) | Behavioral test recombination method, device and storage medium | |
CN109358841A (en) | Web application develops Compilation Method, device and storage equipment, computer equipment | |
US9063742B1 (en) | Version histories for multiple portions of program code | |
CN109634570A (en) | Front and back end integrated development method, device, equipment and computer readable 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 |