CN109614085B - Function realizing method, device, computer equipment and storage medium - Google Patents

Function realizing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109614085B
CN109614085B CN201811302698.7A CN201811302698A CN109614085B CN 109614085 B CN109614085 B CN 109614085B CN 201811302698 A CN201811302698 A CN 201811302698A CN 109614085 B CN109614085 B CN 109614085B
Authority
CN
China
Prior art keywords
metadata
template
exploitation
database
logic
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
CN201811302698.7A
Other languages
Chinese (zh)
Other versions
CN109614085A (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.)
Shenzhen Micro Mdt Infotech Ltd
Original Assignee
Shenzhen Micro Mdt Infotech 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 Shenzhen Micro Mdt Infotech Ltd filed Critical Shenzhen Micro Mdt Infotech Ltd
Publication of CN109614085A publication Critical patent/CN109614085A/en
Application granted granted Critical
Publication of CN109614085B publication Critical patent/CN109614085B/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

Abstract

This application involves a kind of function realizing methods, this method comprises: obtaining the corresponding metadata of function to be developed, the object content to be added to front end page is obtained according to the metadata, the object content is added to corresponding DOM Document Object Model, complete the exploitation of front end page, it obtains background logic and develops template, the exploitation of backstage service logic is completed according to the metadata and background logic exploitation template, obtain type of database, the script file for creating database table is generated according to the metadata and the type of database, execute the creation that the script file completes the database table, the front end page, the background service logic and the database table for realizing the function to be developed jointly.The function realizing method not only reduces development cost, also improves development efficiency.Furthermore, it is also proposed that a kind of function realization device, computer equipment and storage medium.

Description

Function realizing method, device, computer equipment and storage medium
Technical field
The present invention relates to field of computer technology, more particularly, to a kind of function realizing method, device, computer equipment and Storage medium.
Background technique
The functional development of system at present needs respectively to carry out foreground display interface, background service logic and database table Exploitation.Each stage needs split hair ring border and compilation process has different degrees of requirement, and developer is also required to understanding pair Answering the development language of step can just be developed, and this development mode is caused not only to increase development cost, and development efficiency It is low.
Summary of the invention
Based on this, it is necessary in view of the above-mentioned problems, providing a kind of development efficiency height, function realizing method at low cost, dress It sets, computer equipment and storage medium.
In a first aspect, the embodiment of the present invention provides a kind of function realizing method, which comprises
Obtain the corresponding metadata of function to be developed;
The object content to be added to front end page is obtained according to the metadata, the object content is added to accordingly DOM Document Object Model, complete the exploitation of front end page;
It obtains background logic and develops template, background service is completed according to the metadata and background logic exploitation template The exploitation of logic;
Type of database is obtained, the foot for creating database table is generated according to the metadata and the type of database This document;
Execute the creation that the script file completes the database table, the front end page, the background service logic With the database table for realizing the function to be developed jointly.
The background logic exploitation template includes: Java entity class template and controller class in one of the embodiments, Template;The acquisition background logic develops template, completes backstage according to the metadata and background logic exploitation template and takes The exploitation for logic of being engaged in, comprising: according to the key assignments of the metadata respectively in the Java entity class template and the controller class Variable to be replaced is searched in template;The variable is replaced using value corresponding with the key assignments to generate respectively and the Java reality Body class and the corresponding file of the controller class, complete the exploitation of the background service logic.
The acquisition type of database in one of the embodiments, according to the metadata and the type of database Generate the script file for creating database table, comprising: obtain script template corresponding with the type of database;According to institute It states metadata and the script template generates script file for creating database table.
The object content obtained according to the metadata to be added to front end page in one of the embodiments, The object content is added to corresponding DOM Document Object Model, completes the exploitation of front end page, comprising: according to the metadata In field information obtain to be added to front end page object content, the object content is added to phase in the form of object The DOM Document Object Model answered;Corresponding object content corresponding front end page is loaded by way of loading object to show Show.
In one of the embodiments, the method also includes: custom-configured by the reception of the function interface of metadata Metadata, the metadata includes: main information and managing detailed catalogue, and the main information includes: metadata title, table name, service The create-rule of name, major key ID;The managing detailed catalogue includes: field name, field description, field type, field length.
Second aspect, the embodiment of the present invention provide a kind of function realization device, and described device includes:
Metadata obtains module, for obtaining the corresponding metadata of function to be developed;
Front end development module will be described for obtaining the object content to be added to front end page according to the metadata Object content is added to corresponding DOM Document Object Model, completes the exploitation of front end page;
Backstage development module is opened for obtaining background logic exploitation template according to the metadata and the background logic Send out the exploitation that template completes backstage service logic;
Generation module is generated according to the metadata and the type of database for creating for obtaining type of database Build the script file of database table;
Execution module, completes the creation of the database table for executing the script file, the front end page, described Background service logic and the database table for realizing the function to be developed jointly.
The background logic exploitation template includes: Java entity class template and controller class in one of the embodiments, Template;The backstage development module is also used to according to the key assignments of the metadata respectively in the Java entity class template and described Variable to be replaced is searched in controller class template;The variable is replaced using value corresponding with the key assignments to generate respectively and institute Java entity class and the corresponding file of the controller class are stated, the exploitation of the background service logic is completed.
The generation module is also used to obtain script mould corresponding with the type of database in one of the embodiments, Plate generates the script file for creating database table according to the metadata and the script template.
In one of the embodiments, front end development module be also used to according in the metadata field information obtain to It is added to the object content of front end page, the object content is added to corresponding DOM Document Object Model in the form of object; Corresponding object content corresponding front end page is loaded by way of loading object to show.
Described device in one of the embodiments, further include: receiving module, for being connect by the function interface of metadata The metadata custom-configured is received, the metadata includes: main information and managing detailed catalogue, and the main information includes: metadata name Title, table name, Service name, major key ID create-rule;The managing detailed catalogue include: field name, field description, field type, Field length.
The third aspect, the embodiment of the present invention provide a kind of computer equipment, including memory and processor, the memory It is stored with computer program, when the computer program is executed by the processor, so that the processor executes following steps:
Obtain the corresponding metadata of function to be developed;
The object content to be added to front end page is obtained according to the metadata, the object content is added to accordingly DOM Document Object Model, complete the exploitation of front end page;
It obtains background logic and develops template, background service is completed according to the metadata and background logic exploitation template The exploitation of logic;
Type of database is obtained, the foot for creating database table is generated according to the metadata and the type of database This document;
Execute the creation that the script file completes the database table, the front end page, the background service logic With the database table for realizing the function to be developed jointly.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, are stored with computer program, described When computer program is executed by processor, so that the processor executes following steps:
Obtain the corresponding metadata of function to be developed;
The object content to be added to front end page is obtained according to the metadata, the object content is added to accordingly DOM Document Object Model, complete the exploitation of front end page;
It obtains background logic and develops template, background service is completed according to the metadata and background logic exploitation template The exploitation of logic;
Type of database is obtained, the foot for creating database table is generated according to the metadata and the type of database This document;
Execute the creation that the script file completes the database table, the front end page, the background service logic With the database table for realizing the function to be developed jointly.
Above-mentioned function realizing method, device, computer equipment and storage medium, by according to metadata obtain to be added to Preceding end page can be completed then by the way that object content is added to corresponding DOM Document Object Model in the object content of front end page The exploitation in face, the exploitation of backstage service logic can be completed by then developing template and metadata combination according to background logic, finally The creation of database table is completed according to type of database and metadata.That is, the metadata based on configuration, it can be fast Speed is simply completed the exploitation of front end page, the exploitation of background service logic and the creation of database table, thus realize to The function of exploitation.The function realizing method not only reduces development cost, and improves development efficiency.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with The structure shown according to these attached drawings obtains other attached drawings.
Fig. 1 is the flow chart of function realizing method in one embodiment;
Fig. 2 is the method flow diagram of background service logic development in one embodiment;
Fig. 3 is the schematic diagram of code in template in one embodiment;
Fig. 4 is the method flow diagram of front end page exploitation in one embodiment;
Fig. 5 A is the configuration interface of the main information of metadata in one embodiment;
Fig. 5 B is the configuration interface of the managing detailed catalogue of metadata in one embodiment;
Fig. 6 is the structural block diagram of function realization device in one embodiment;
Fig. 7 is the structural block diagram of function realization device in another embodiment;
Fig. 8 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
As shown in Figure 1, proposing a kind of function realizing method, which both can be applied to terminal, can also To be applied to server, the present embodiment is illustrated with being applied to terminal.The function realizing method specifically includes the following steps:
Step 102, the corresponding metadata of function to be developed is obtained.
Wherein, metadata, also known as broker data, relaying data mainly describe data attribute for the data for describing data Information, for support such as indicate storage location, historical data, resource lookup, file record function.Metadata includes: member The information such as data name, table name, description, Service name, the create-rule of major key ID, field name, field type, length.
There are many modes for obtaining metadata, and metadata is generally stored in database, in one embodiment, can To search metadata from database by metadata title.In another embodiment, system provides corresponding creation button, User is carried out by clicking button, for example, when creating button when the user clicks, according to the corresponding metadata title of creation button Metadata is searched from database.
Step 104, the object content to be added to front end page is obtained according to metadata, object content is added to accordingly DOM Document Object Model, complete the exploitation of front end page.
Wherein, metadata includes: field information.Field information includes: field name, field attribute etc..In general, first Field name is contained in data, with which type of control on there are also this fields on page region to be shown and the page (web control) contents such as shows.So the object content to be added to front end page can be obtained according to metadata.Than Such as, it is configured with the field name an of user name inside metadata, then can be added to this name field specified Display area.Furthermore it is also possible to a display properties (for example, control type) of name be configured, for example, if wanting name field Form as an input frame can select in metadata to the display properties of name field when showing on the page " input frame " can, i.e., the field information of needs is configured inside metadata in advance, after getting metadata, so that it may root The object content for needing to be added to front end page is obtained according to the field information in metadata.
DOM Document Object Model (Document Object Model, abbreviation DOM), is that the processing of W3C Organisation recommendations is expansible The standard programming interface of markup language.It is a kind of application programming interfaces unrelated with platform and language (API), it can dynamic Ground accesses program and script, updates the style of its content, structure and www document.Document can further processed, the knot of processing Fruit can be added to the current page.
It is to be understood that a Shipping Options Page on browser is a DOM Document Object Model DOM, in this browser Shipping Options Page In, some controls (object content) is shown if necessary, then needing for control to be added to could be normal on the document object model Display.Corresponding object content is obtained according to metadata, is then added on corresponding DOM Document Object Model and completes front end The exploitation of the page.Relative to the development approach of traditional front end page, the mode based on metadata of being somebody's turn to do realizes opening for front end page Hair, not only increases development efficiency, and reduce development cost, while also reducing exploitation threshold.
Step 106, it obtains background logic and develops template, background service is completed according to metadata and background logic exploitation template The exploitation of logic.
Wherein, background logic exploitation template includes: Java entity class template and controller class template.Background logic develops mould Plate is template predetermined.Template is by fixed format plus needing the variable replaced to generate, by using in metadata Information replacement template in variable, then generate corresponding Java entity class and controller class file, thus complete backstage take The exploitation for logic of being engaged in.In one embodiment, by configuring Java entity class, the controller class mould of VM (velocity) format Plate uses velocity (template engine based on Java, the template instruction provided in conjunction with metadata and background logic exploitation template Can be used on object and variable defined in Java) template engine production Java entity class and controller class blueprint, and The Java file that can be run is generated on corresponding path by blueprint.The Java file that can be run is the java entity class generated And controller class.Relative to the development approach of traditional background service logic, this method only needs to carry out metadata and template In conjunction with can complete the corresponding background service logic development, i.e., only need to configure metadata and Java entity class template and control Device class template can be realized background service logic development, and Java entity class template and controller class template be it is general, it is subsequent When development function, it is only necessary to calling.The background service logic development method not only increases development efficiency, and reduces Development cost, while also reducing exploitation threshold.
Step 108, type of database is obtained, the foot for creating database table is generated according to metadata and type of database This document.
Wherein, the corresponding script grammer of different type of database is different, so first having to obtain type of database.First number Include field name, field length in, whether to be set as major key, whether to be combined into the information such as index.According to the number The script file for creating database table is generated according to library type and metadata.In another embodiment, database is being generated While table, it is also necessary to the corresponding index of creation, for quickly being searched in database table, i.e., according to metadata and class database Type generates the script file for creating database table and index.In one embodiment, according to different script grammer point Different script templates is not set, i.e. disparate databases type corresponds to different script templates, passes through metadata and script template The corresponding script file of combination producing.
Step 110, perform script file completes the creation of database table, front end page, background service logic and database Table for realizing function to be developed jointly.
Wherein, executing can be completed the creation of database table for creating the file of database table.The end page before completing After the exploitation in face, the exploitation of background service logic and the exploitation of database table, that is, complete functional development.Front end page, backstage Service logic and database table for realizing function to be developed jointly.In one embodiment, function to be developed can be realization Single table additions and deletions change function, and the additions and deletions for being also possible to master-slave relationship table change function, can also be other function certainly.The function is realized Method without writing any program code, and fast implements corresponding functional development, substantially increases development efficiency, saves Development cost.
Then above-mentioned function realizing method is led to by obtaining the object content to be added to front end page according to metadata It crosses and object content is added to corresponding DOM Document Object Model, the exploitation of front end page can be completed, then according to background logic Exploitation template and metadata combination can complete the exploitation of backstage service logic, finally be completed according to type of database and metadata The creation of database table.That is, the metadata based on configuration, can quickly and easily complete opening for front end page Hair, the exploitation of background service logic and the creation of database table, to realize function leaved for development.The function realizing method Development cost is not only reduced, and improves development efficiency.
As shown in Fig. 2, in one embodiment, it includes: Java entity class template and controller that background logic, which develops template, Class template;It obtains background logic and develops template, opening for backstage service logic is completed according to metadata and background logic exploitation template Hair, comprising:
Step 106A is searched in Java entity class template and controller class template wait replace respectively according to the key assignments of metadata The variable changed.
Wherein, metadata is to be saved in the form of key assignments in the database, Java entity class template and controller class mould Many variables are defined inside plate, it is identical as by the title of variable to be replaced by the way that the title of key assignments of metadata is arranged, Then corresponding variable is found by the key assignments in metadata in a template.As shown in figure 3, in one embodiment, in template Face defined variable is added in template, such as $ by using the form that $ symbol encases variable plus braces {isExtEntity}.Metadata is saved on database in the form of key assignments, such as isExtEntity:true;So metadata The process combined with template are as follows: metadata is first obtained from database, then with the key assignments of metadata (e.g., isExtEntity) Corresponding variable is found in a template, if it is found, just replacing the variable in template with the corresponding value (e.g., true) of key assignments (such as $ { isExtEntity } becomes true).
Step 106B is generated corresponding with Java entity class and controller class respectively using value corresponding with key assignments replacement variable File, complete backstage service logic exploitation.
Wherein, the variable in value replacement Java entity class template corresponding with key assignments is respectively adopted, generates and Java entity The corresponding file of class generates text corresponding with controller class using the variable in value replacement controller class template corresponding with key assignments Part.Generate Java entity class and the controller class in background service logic.Since the purpose of functional development is that data are deposited It stores up database table and shows.Java entity class can be understood as the container of dress data, when data are written to database, meeting Data are first attached to the data method that entity class (container) is inner, is then written by controller class the inside, the data of container are led Enter onto the corresponding table of database (database table).
In one embodiment, type of database is obtained, is generated according to metadata and type of database for creating data The script of library table, comprising: obtain script template corresponding with type of database;It is generated according to metadata and script template for creating Build the script file of database table.
Wherein, the corresponding script grammer of disparate databases type is different, so presetting for disparate databases type Then corresponding script template generates the script file for creating database according to metadata and script template.In a reality Apply in example, according to the key assignments of metadata searched in script template it is to be replaced fall variable, then generate for creating data The script file of library table, script file are generally SQL (Structured Query Language, structured query language) foot This document.
As shown in figure 4, in one embodiment, the object content to be added to front end page is obtained according to metadata, it will Object content is added to corresponding DOM Document Object Model, completes the exploitation of front end page, comprising:
Step 104A obtains the object content to be added to front end page according to the field information in metadata, by target Content is added to corresponding DOM Document Object Model in the form of object.
Wherein, field information includes: field name, field attribute, field area etc..It is arrived according to field name is available Corresponding field contents, then can determine the Control Cooling of the field according to field attribute, for example, being input frame or search Frame.It can be with display area of the field on the page (for example, query region, display area) according to field area.Object content is Refer to the content shown in front end.The corresponding DOM Document Object Model of one Shipping Options Page, by object content with object (for example, HTML Object) form be added to corresponding DOM Document Object Model, front end page is loaded into the form of object convenient for subsequent.As an example Son, if to show a webpage, the things such as picture, search column in webpage are added on this DOM just in the form of object It can normally show.
In one embodiment, in metadata configurations, it can also provide a function and be used as the specific menu page of creation, When creating menu page, the relationship of metadata and menu is established.When developing front end page, can be found by clicking menu Corresponding metadata.Then corresponding object content is obtained according to the field information in metadata.
Corresponding object content is loaded into corresponding front end page by way of loading object and shown by step 104B Show.
Wherein, after object content being added to DOM Document Object Model in the form of object, so that it may pass through load object Corresponding object content is loaded into corresponding front end page and shown by mode, to complete the exploitation of front end page.
In one embodiment, above-mentioned function realizing method further include: received by the function interface of metadata customized The metadata of configuration, the metadata include: main information and managing detailed catalogue, the main information include: metadata title, table name, The create-rule of Service name, major key ID;The managing detailed catalogue includes: field name, field description, field type, field length.
Wherein, the metadata custom-configured is received by visual function interface.Metadata is divided into main information and bright Thin information.Main information include: metadata title, table name, Service name, major key ID create-rule.Main information is mainly used for creating The title (metadata title) of entity class, the title (Service name) for servicing class, services class at the title (table name) of database table Address URL etc..Managing detailed catalogue includes: field name, field type, field length etc., in addition, managing detailed catalogue can also include: Field description, column type etc..Whether can e.g. be used with configuration field by the purposes of the additional configuration field of field information In inquiry, display.Metadata is to be stored with the dimension of metadata title in the database, passes through title when it is desired to be used from number It obtains and processes according to library.It as shown in Figure 5A, is configuration circle of the main information of the metadata provided the user in one embodiment Face is as shown in Figure 5 B the configuration interface of the managing detailed catalogue of the metadata provided the user in one embodiment.By visual The function interface of change can custom-configure metadata, be provided the foundation to be subsequent according to metadata progress functional development.
As shown in fig. 6, the embodiment of the present invention provides a kind of function realization device, described device includes:
Metadata obtains module 602, for obtaining the corresponding metadata of function to be developed;
Front end development module 604, for obtaining the object content to be added to front end page according to the metadata, by institute It states object content and is added to corresponding DOM Document Object Model, complete the exploitation of front end page;
Backstage development module 606, for obtaining background logic exploitation template, according to the metadata and the background logic Develop the exploitation that template completes backstage service logic;
Generation module 608 is used for for obtaining type of database according to the metadata and type of database generation Create the script file of database table;
Execution module 610, completes the creation of the database table for executing the script file, the front end page, The background service logic and the database table for realizing the function to be developed jointly.
In one embodiment, the background logic exploitation template includes: Java entity class template and controller class template; The backstage development module is also used to the key assignments according to the metadata respectively in the Java entity class template and the control Variable to be replaced is searched in device class template;Using value corresponding with the key assignments replace the variable generate respectively with it is described Java entity class and the corresponding file of the controller class, complete the exploitation of the background service logic.
In one embodiment, the generation module is also used to obtain script template corresponding with the type of database, The script file for creating database table is generated according to the metadata and the script template.
In one embodiment, front end development module is also used to be obtained according to the field information in the metadata to be added To the object content of front end page, the object content is added to corresponding DOM Document Object Model in the form of object;Pass through Corresponding object content is loaded into corresponding front end page and shown by the mode of load object.
As shown in fig. 7, in one embodiment, above-mentioned function realization device further include: receiving module 601, for passing through The function interface of metadata receives the metadata custom-configured, and the metadata includes: main information and managing detailed catalogue, the master Information include: metadata title, table name, Service name, major key ID create-rule;The managing detailed catalogue includes: field name, word Segment description, field type, field length.
Fig. 8 shows the internal structure chart of computer equipment in one embodiment.The computer equipment specifically can be clothes Business device, is also possible to terminal.As shown in figure 8, the computer equipment include by system bus connect processor, memory and Network interface.Wherein, memory includes non-volatile memory medium and built-in storage.The non-volatile memories of the computer equipment Media storage has operating system, can also be stored with computer program, when which is executed by processor, may make processing Device realizes function realizing method.Computer program can also be stored in the built-in storage, which is executed by processor When, it may make processor to execute function realizing method.It will be understood by those skilled in the art that structure shown in Fig. 8, only The block diagram of part-structure relevant to application scheme, does not constitute the computer equipment being applied thereon to application scheme Restriction, specific computer equipment may include than more or fewer components as shown in the figure, or the certain components of combination, or Person has different component layouts.
In one embodiment, function realizing method provided by the present application can be implemented as a kind of shape of computer program Formula, computer program can be run in computer equipment as shown in Figure 8.Composition can be stored in the memory of computer equipment should Each process template of function realization device.For example, metadata obtains module 602, front end development module 604, backstage exploitation mould Block 606, generation module 608 and execution module 610.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the calculating When machine program is executed by the processor, so that the processor executes following steps:
Obtain the corresponding metadata of function to be developed;
The object content to be added to front end page is obtained according to the metadata, the object content is added to accordingly DOM Document Object Model, complete the exploitation of front end page;
It obtains background logic and develops template, background service is completed according to the metadata and background logic exploitation template The exploitation of logic;
Type of database is obtained, the foot for creating database table is generated according to the metadata and the type of database This document;
Execute the creation that the script file completes the database table, the front end page, the background service logic With the database table for realizing the function to be developed jointly.
In one embodiment, the background logic exploitation template includes: Java entity class template and controller class template; The acquisition background logic develops template, completes backstage service logic according to the metadata and background logic exploitation template Exploitation, comprising: according to the key assignments of the metadata respectively in the Java entity class template and the controller class template Search variable to be replaced;Using value corresponding with the key assignments replace the variable generates respectively and the Java entity class and The corresponding file of the controller class, completes the exploitation of the background service logic.
In one embodiment, the acquisition type of database is generated according to the metadata and the type of database For creating the script file of database table, comprising: obtain script template corresponding with the type of database;According to the member Data and the script template generate the script file for creating database table.
In one embodiment, the object content obtained according to the metadata to be added to front end page, by institute It states object content and is added to corresponding DOM Document Object Model, complete the exploitation of front end page, comprising: according in the metadata Field information obtains the object content to be added to front end page, and the object content is added to accordingly in the form of object DOM Document Object Model;Corresponding object content corresponding front end page is loaded by way of loading object to show.
In one embodiment, it when the computer program is executed by the processor, is also used to execute following steps: logical The function interface for crossing metadata receives the metadata that custom-configures, and the metadata includes: main information and managing detailed catalogue, described Main information include: metadata title, table name, Service name, major key ID create-rule;The managing detailed catalogue include: field name, Field description, field type, field length.
A kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor, So that the processor executes following steps:
Obtain the corresponding metadata of function to be developed;
The object content to be added to front end page is obtained according to the metadata, the object content is added to accordingly DOM Document Object Model, complete the exploitation of front end page;
It obtains background logic and develops template, background service is completed according to the metadata and background logic exploitation template The exploitation of logic;
Type of database is obtained, the foot for creating database table is generated according to the metadata and the type of database This document;
Execute the creation that the script file completes the database table, the front end page, the background service logic With the database table for realizing the function to be developed jointly.
In one embodiment, the background logic exploitation template includes: Java entity class template and controller class template; The acquisition background logic develops template, completes backstage service logic according to the metadata and background logic exploitation template Exploitation, comprising: according to the key assignments of the metadata respectively in the Java entity class template and the controller class template Search variable to be replaced;Using value corresponding with the key assignments replace the variable generates respectively and the Java entity class and The corresponding file of the controller class, completes the exploitation of the background service logic.
In one embodiment, the acquisition type of database is generated according to the metadata and the type of database For creating the script file of database table, comprising: obtain script template corresponding with the type of database;According to the member Data and the script template generate the script file for creating database table.
In one embodiment, the object content obtained according to the metadata to be added to front end page, by institute It states object content and is added to corresponding DOM Document Object Model, complete the exploitation of front end page, comprising: according in the metadata Field information obtains the object content to be added to front end page, and the object content is added to accordingly in the form of object DOM Document Object Model;Corresponding object content corresponding front end page is loaded by way of loading object to show.
In one embodiment, it when the computer program is executed by the processor, is also used to execute following steps: logical The function interface for crossing metadata receives the metadata that custom-configures, and the metadata includes: main information and managing detailed catalogue, described Main information include: metadata title, table name, Service name, major key ID create-rule;The managing detailed catalogue include: field name, Field description, field type, field length.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, provided herein Each embodiment used in any reference to memory, storage, database or other media, may each comprise non-volatile And/or volatile memory.Nonvolatile memory may include that read-only memory (ROM), programming ROM (PROM), electricity can be compiled Journey ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) directly RAM (RDRAM), straight Connect memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of function realizing method, which is characterized in that the described method includes:
The corresponding metadata of function to be developed is obtained, metadata refers to the data of description data, including field information, field information It include: field name and field attribute;
The object content to be added to front end page is obtained according to the metadata, the object content is added to corresponding text Shelves object model, completes the exploitation of front end page;
It obtains background logic and develops template, the change in the background logic exploitation template is replaced using the information in the metadata Amount generates corresponding background logic exploitation file, to complete the exploitation of backstage service logic;
Type of database is obtained, the script text for creating database table is generated according to the metadata and the type of database Part;
Execute the creation that the script file completes the database table, the front end page, the background service logic and institute Database table is stated for realizing the function to be developed jointly.
2. the method according to claim 1, wherein background logic exploitation template includes: Java entity class Template and controller class template, the information in the metadata includes key assignments;
The acquisition background logic develops template, is replaced in the background logic exploitation template using the information in the metadata Variable, corresponding background logic exploitation file is generated, to complete the exploitation of backstage service logic, comprising:
It is searched in the Java entity class template and the controller class template wait replace respectively according to the key assignments of the metadata The variable changed;
The variable is replaced using value corresponding with the key assignments to generate respectively and the Java entity class and the controller class Corresponding file completes the exploitation of the background service logic.
3. the method according to claim 1, wherein the acquisition type of database, according to the metadata and The type of database generates the script file for creating database table, comprising:
Obtain script template corresponding with the type of database;
The script file for creating database table is generated according to the metadata and the script template.
4. the method according to claim 1, wherein described obtain according to the metadata to be added to preceding end page The object content is added to corresponding DOM Document Object Model, completes the exploitation of front end page by the object content in face, comprising:
According in the metadata field information obtain to be added to front end page object content, by the object content with The form of object is added to corresponding DOM Document Object Model;
Corresponding object content corresponding front end page is loaded by way of loading object to show.
5. the method according to claim 1, wherein the method also includes:
The metadata custom-configured is received by the function interface of metadata, the metadata includes: main information and detail letter Breath, the main information include: metadata title, table name, Service name, major key ID create-rule;The managing detailed catalogue includes: word Name section, field description, field type, field length.
6. a kind of function realization device, which is characterized in that described device includes:
Metadata obtains module, and for obtaining the corresponding metadata of function to be developed, metadata refers to the data of description data, packet Field information is included, field information includes: field name and field attribute;
Front end development module, for obtaining the object content to be added to front end page according to the metadata, by the target Content is added to corresponding DOM Document Object Model, completes the exploitation of front end page;
Backstage development module replaces the backstage using the information in the metadata for obtaining background logic exploitation template Variable in logic development template generates corresponding background logic exploitation file, to complete the exploitation of backstage service logic;
Generation module is generated according to the metadata and the type of database for creating number for obtaining type of database According to the script file of library table;
Execution module completes the creation of the database table, the front end page, the backstage for executing the script file Service logic and the database table for realizing the function to be developed jointly.
7. device according to claim 6, which is characterized in that the background logic exploitation template includes: Java entity class Template and controller class template, the information in the metadata includes key assignments;
The backstage development module is also used to according to the key assignments of the metadata respectively in the Java entity class template and described Variable to be replaced is searched in controller class template;The variable is replaced using value corresponding with the key assignments to generate respectively and institute Java entity class and the corresponding file of the controller class are stated, the exploitation of the background service logic is completed.
8. device according to claim 6, which is characterized in that the generation module is also used to obtain and the class database The corresponding script template of type generates the script file for creating database table according to the metadata and the script template.
9. a kind of computer equipment, including memory and processor, the memory is stored with computer program, the computer When program is executed by the processor, so that the processor executes the step such as any one of claims 1 to 5 the method Suddenly.
10. a kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor, So that the processor is executed such as the step of any one of claims 1 to 5 the method.
CN201811302698.7A 2018-10-23 2018-11-02 Function realizing method, device, computer equipment and storage medium Active CN109614085B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2018112367768 2018-10-23
CN201811236776 2018-10-23

Publications (2)

Publication Number Publication Date
CN109614085A CN109614085A (en) 2019-04-12
CN109614085B true CN109614085B (en) 2019-11-29

Family

ID=66001861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811302698.7A Active CN109614085B (en) 2018-10-23 2018-11-02 Function realizing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109614085B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083342B (en) * 2019-04-26 2023-04-18 重庆紫光华山智安科技有限公司 Program generation method and device and computer readable storage medium
CN110531977B (en) * 2019-09-04 2023-08-11 香港大德昌龙生物科技有限公司 Automatic control method and device for instrument, computer equipment and storage medium
CN110727429B (en) * 2019-09-18 2023-07-21 东软集团股份有限公司 Front-end page generation method, device and equipment
CN110674141A (en) * 2019-10-09 2020-01-10 四川长虹电器股份有限公司 Method for adding database table to page based on java development
CN113608724B (en) * 2021-08-24 2023-12-15 上海德拓信息技术股份有限公司 Offline warehouse real-time interaction method and system based on model cache implementation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126569A (en) * 2016-06-17 2016-11-16 南京乐运乐科技有限公司 A kind of rapid data method of servicing and system
CN106775729A (en) * 2016-12-21 2017-05-31 浪潮通信信息系统有限公司 A kind of mobile client business rendering method and system based on data description
CN106844514A (en) * 2016-12-28 2017-06-13 平安科技(深圳)有限公司 A kind of page makeup method and terminal
CN107943819A (en) * 2017-10-09 2018-04-20 中国电子科技集团公司第二十八研究所 A kind of data managing method and device based on metadata configurations
CN108496154A (en) * 2017-11-30 2018-09-04 深圳市大疆创新科技有限公司 Web site contents service architecture method and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7305652B2 (en) * 2004-03-11 2007-12-04 International Business Machines Corporation Standard application development template
US8438537B2 (en) * 2005-03-07 2013-05-07 Siemens Aktiengesellschaft System arrangement and method for automated application development with user guidance
CN101572622B (en) * 2009-03-02 2012-08-29 南京联创科技集团股份有限公司 Realization method for dynamically expanding resource metadata
CN105095348B (en) * 2015-06-09 2019-03-26 北京织星科技有限公司 A method of passing through XML dynamic configuration website
US9904521B2 (en) * 2015-06-18 2018-02-27 United Parcel Service Of America, Inc. Automation of canonical model usage in application development processes
CN105549982B (en) * 2016-01-14 2018-08-10 国网山东省电力公司物资公司 A kind of development of automation platform based on model configuration
CN106095408B (en) * 2016-05-31 2019-05-14 浙江网新恒天软件有限公司 A kind of system and method for data monitoring and Code automatic build and deployment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126569A (en) * 2016-06-17 2016-11-16 南京乐运乐科技有限公司 A kind of rapid data method of servicing and system
CN106775729A (en) * 2016-12-21 2017-05-31 浪潮通信信息系统有限公司 A kind of mobile client business rendering method and system based on data description
CN106844514A (en) * 2016-12-28 2017-06-13 平安科技(深圳)有限公司 A kind of page makeup method and terminal
CN107943819A (en) * 2017-10-09 2018-04-20 中国电子科技集团公司第二十八研究所 A kind of data managing method and device based on metadata configurations
CN108496154A (en) * 2017-11-30 2018-09-04 深圳市大疆创新科技有限公司 Web site contents service architecture method and system

Also Published As

Publication number Publication date
CN109614085A (en) 2019-04-12

Similar Documents

Publication Publication Date Title
CN109614085B (en) Function realizing method, device, computer equipment and storage medium
JP5009293B2 (en) Web page rendering priority mechanism
US11087074B2 (en) Hybrid web publishing system
US7007266B1 (en) Method and software system for modularizing software components for business transaction applications
KR20140038989A (en) Automated user interface object transformation and code generation
US10977054B2 (en) Method and system for providing and executing web applications with runtime interpreter
US11537683B2 (en) Configuration of content site user interaction monitoring in data networks
CN110297636A (en) A kind of automatic production of HTML page and parameter management method based on page configuration file, system and device
CN111158687B (en) Interface generation method and device of JAVA plugin, computer equipment and storage medium
CN115994517A (en) Information processing method, apparatus, storage medium, device, and program product
JP2001125855A (en) Dynamic web page generation program
Naik et al. Enhancing PHP Coding with CodeIgniter: Hands-on Experience with CodeIgniter
Krause et al. Shadow DOM
CN115981650A (en) Website building method and device, electronic equipment and storage medium
Borycki et al. Consuming RESTful Web Services
Kromann et al. MVC and Frameworks
Yang Art of Trade-Offs
Troelsen et al. Web Applications using Razor Pages
Prakash et al. Liferay Customization
Yang Design Patterns of Vue. js 3
CN115268912A (en) Page generation method, device, equipment and storage medium
Tomlinson et al. Creating Modules for Drupal 8
CN117707493A (en) Front-end interface generation method and device, electronic equipment and storage medium
CN111949266A (en) Webpage generation method and device and electronic equipment
Scott et al. Globalization: by Francis Mignault

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