CN101398755A - Software auto generating method based on template - Google Patents

Software auto generating method based on template Download PDF

Info

Publication number
CN101398755A
CN101398755A CNA2008101420279A CN200810142027A CN101398755A CN 101398755 A CN101398755 A CN 101398755A CN A2008101420279 A CNA2008101420279 A CN A2008101420279A CN 200810142027 A CN200810142027 A CN 200810142027A CN 101398755 A CN101398755 A CN 101398755A
Authority
CN
China
Prior art keywords
template
list
data
software
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2008101420279A
Other languages
Chinese (zh)
Inventor
满延平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CNA2008101420279A priority Critical patent/CN101398755A/en
Publication of CN101398755A publication Critical patent/CN101398755A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses an automatic software generating method based on a template which includes the steps as follows: a, the template of a processing list menu or a data list is added; b, the information of a data source needed to be operated and treated is set on the template; c, various information arranged on the template is searched by the template and automatic combination is carried out according to the information obtained through searching for realizing the SQL sentences of the commonly used functions of the software; besides, codes for automatically transferring the SQL sentences are automatically generated, thereby realizing the functional software for automatically generating the processing list menu or the data list. In the invention, a template technology is adopted for realizing automatic software generation with the commonly used functions in software development by dragging custom controls and setting the property and the Xml document information of the custom controls, thus being capable of greatly reducing the software developing cost and developing risk as well as improving the software developing speed and the quality of a product.

Description

A kind of software auto generating method based on template
Technical field
The present invention relates to the information processing technology that software code generates, especially relate to a kind of based on acquiring self-defined control on the template and the method that the Xml file realizes the template of handling list or data list is carried out the generation of automatic function software being set.
Background technology
From present case, the speed of software development is slow, of a high price and very easily make mistakes, and usually can produce the product that has a large amount of defectives, is causing serious problem aspect availability, reliability, performance, safety and other service quality.
According to Standish Group[Sta94] statistics, about 175,000 development project of the annual investment of u s company, investment is about 2,500 hundred million dollars.Have only 16% can finish according to plan in these projects budgetary.Other has 31% project to be cancelled mainly due to quality problems, and economic loss is about 81,000,000,000 dollars.Other 53% project on average excesses budget 189%, and economic loss is about 59,000,000,000 dollars.The project of finishing on average only realized original planning function 42%.
These numerals have been confirmed the judgement that we are rule of thumb made objectively, that be exactly software development be a labor-intensive industry, the human capital that value consumed that it creates each dollar has surpassed our expectation value for a modernized industry.
Therefore, how to improve the development efficiency of software, save software development cost, become that current software industry is discussed warmly and one of urgent problem.
Summary of the invention
The objective of the invention is to propose a kind of based on acquiring self-defined control on the template and the method that the Xml file realizes the template of handling list or data list is carried out the generation of automatic function software being set, to realize the automatic generation of software conventional func, the software developer is freed from the work of writing code, thereby improve software development efficiency and reduce software development cost.
For solving technical matters of the present invention, the present invention discloses a kind of software auto generating method based on template, and it comprises step:
A, a newly-increased template of handling list or data list;
B, the information that need carry out the data source of operational processes is set on template;
C, template are retrieved the various information that are provided with on it, the information Automatic Combined that obtains according to retrieval generates the SQL statement that list or data list are handled, and by generating the functional software that the code that calls SQL statement automatically generates processing list or data list automatically.
More excellent, also comprise before the step c: on template, acquire the self-defined control of data source being operated with template, and self-defined control and data source associated attributes information are set.
More excellent, the list template of described template for list is handled; Step b comprises:
B1, the self-defined control of the data source of on the list template, acquiring;
B2, the attribute information of the self-defined control of this data source is set;
Wherein, the attribute information among the step b2 comprises: be used to specify the crucial name attribute of title of the key word of data source, and be used for specified data and be derived from the data source property that the definition control is specifically operated which table or view.
More excellent, described template is the data list template of deal with data tabulation; Step b comprises:
B1, the newly-increased Xml file that is used for the record data list information and shines upon with the data list template;
B2, the cell attribute information of data source is set in the Xml file.
More excellent, described cell attribute information comprises: whether whether the attribute information of the field name in the attribute information of the title of expression cell, expression corresponding data source, expression cell visible attribute information, expression cell are that the display mode of read-only attribute information, expression cell is the attribute information of the regular expression rule of the attribute information of the attribute information of the attribute information of text box or check box or drop-down list or image or button, expression data type, expression cell length or expression text box content.
More excellent, described template is for handling the multilist operation template of a plurality of tables of data that are mutually related;
Step b comprises: acquiring 2 on multilist operation template, to be respectively applied for each data source of decision be the list expression way or the self-defined control of data list expression way, and the attribute that these 2 self-defined controls are set is provided with the relevance of a plurality of tables of data;
And also comprise before the step b: judge that multilist operates template and whether adopt TabControl tab control to organize the page, if then need further to obtain the information of current TabItem tab control.
Compared with prior art, the present invention has following beneficial effect:
Key problem in technology of the present invention is a mould plate technique, by dilatory self-defined control with the attribute of self-defined control is set and the Xml fileinfo realizes that the automatic software of common function in the software development (such as newly-increased, deletion, modification, inquiry, page turning etc.) generates.Therefore, the present invention is mainly used in the assistance software development, can reduce software development cost and development risk greatly, improves the quality of software development speed and product; And make the software development job simplification, reduced requirement to a certain extent, thereby it is popular to help software development work, save human cost software developer's technical know-how.
Description of drawings
Fig. 1 is the schematic flow sheet of first embodiment of the invention;
Fig. 2 is the schematic flow sheet of second embodiment of the invention;
Fig. 3 is the schematic flow sheet of third embodiment of the invention;
Embodiment
Key problem in technology of the present invention is a mould plate technique, by dilatory self-defined control with the attribute of self-defined control is set and the Xml fileinfo realizes that the automatic software of common function in the software development (such as newly-increased, deletion, modification, inquiry and page turning etc.) generates.
As shown in Figure 1.Present embodiment realizes that for utilizing list template (FormTemplate) software generates automatically, need not the software developer and writes any code, can realize the software operation functions such as newly-increased, modification, deletion, inquiry, page turning to data source.
Wherein, FormTemplate is used for list (Form) is handled.The principle of work of present embodiment is the self-defined control information on the key single mode plate, and is undertaken finishing some specific functions after related the setting by these information.Present embodiment comprises the steps:
Step S110, under the programmed environment of software, newly-increased list template.
Step S120, the self-defined control of data source that select to need from the tool box also are dragged on the FormTemplate, and the attribute of the self-defined control of this data source is set, this attribute comprises: the crucial name attribute (DatakeyNames) that is used for determining the title of data source property (DataSource) which form (Table) or view (View) are operated and the key word that is used to specify data source.
Step S130, according to the manifestation mode of data source on list, the self-defined control that drags other according to actual needs is to the list template, and itself and relevant information such as corresponding field name of data source and data type are set.
Such as, if the manifestation mode of data source on list is text box assembly (TextBox), then is dragged to other self-defined controls on the list template Datafield attribute (be used to represent that it is corresponding with data source field name), DbType attribute (being used to represent the data type of field), Regex attribute (being used to represent the regular expression rule of text box assembly Chinese version) can be set.
If the manifestation mode of data source on list is drop-down list (ComboBox or DropDownlist), other self-defined controls that are dragged on the list template can be provided with Datafield attribute, DbType attribute, TableOrView attribute (being used to indicate to be tied to the DSN of ComboBox) etc.
Step S140, list template are retrieved the information of top self-defined control, and obtain the relevant information of each self-defined control, comprise data source, data source field, data source data type or the like.
The relevant information of each self-defined control that step S150, list template basis retrieve, automatically generate the SQL statement of functions such as newly-increased, the modification finished data source, deletion, inquiry, page turning, and by generating the functional software that the code that calls SQL statement automatically generates the processing list automatically.
Therefore, present embodiment does not need to write any code, helps soft developer to free from the maintenance of list, and notice is put in the program business field.
As shown in Figure 2.Present embodiment realizes that for utilizing data list template (ListTemplate) software generates automatically.Wherein, data list template is used for deal with data tabulation.The principle of work of present embodiment is the manifestation mode by the information record data tabulation of Xml file, generates software code automatically to realize the software function of appointment by the information of retrieving the Xml file.Present embodiment comprises the steps:
Step S210, newly-increased data tabulation template.
The mapping Xml file of step S220, newly-increased data list template is with the relevant information of record data tabulation.
Step S230, the cell attribute of data source is set in the Xml file.The cell attribute comprises: Text attribute (title of expression cell), Name attribute (field name in expression corresponding data source), Visible attribute (as seen whether the expression cell), ReadOnly attribute (whether the expression cell is read-only), DisplayMode attribute (the display mode of expression cell, display mode can be text box (TextBox), check box (CheckBox), drop-down list (ComboBox), image (Image) or button (Button)), Type attribute (expression data type), Length attribute (expression cell length) or Regex attribute (the regular expression rule of expression text box content), even the attribute information of some relevant process operation can also be set.
The relevant information of step S240, data list template retrieval Xml file, whether the information that is obtained by retrieval decides the manifestation mode, data type of data list, is read-only etc., and automatically generate according to these information be used to realize to delete, increase, the SQL statement of function reasons such as modification, inquiry or page turning, and by generate the code that calls SQL statement automatically generate automatically be used to realize to delete, increase newly, the functional software of processing such as modification, inquiry or page turning.
As shown in Figure 3.Present embodiment realizes that for utilizing multilist operation template (MultiTableTemplate) software generates automatically.Multilist operation template is used for handling a plurality of tables of data that are mutually related.The principle of work of present embodiment is that to decide each data source by RepositoryFormPanel and the self-defined control of RepositoryListPanel be the expression way of list (FormTemplate) or the expression way of data list (ListTemplat).By the interrelational form that RepositoryDataSource attribute, RepositoryDataSourceDatafield attribute, RepositoryToTables attribute, RepositoryToTableDataField attribute decide multilist is set, finish the operation of appointment again by other the self-defined control information on retrieval RepositoryFormPanel and the RepositoryListPane control.Present embodiment comprises the steps:
Step S310, newly-increased multilist operation template.
Step S320, the self-defined control of RepositoryFormPanel and the self-defined control of RepositoryListPanel are dragged to multilist operation template, to determine that each data source is the expression way of list (FormTemplate) or the expression way or the form of expression of data list (ListTemplat).
Step S330, the title and the interrelated field of the data source that is mutually related are set, with the interrelational form in specified data source.
Step S340, other self-defined controls are dragged to multilist operation template as required, and relevant informations such as the field of data source correspondence and data type are set.Because multilist operation template is based on list template and data list template, thus can as the list template and the data list template is dilatory self-defined control is set and the Xml fileinfo is set, to determine the needed information of multilist operation template.
Step S350, judge whether multilist operation template adopts TabControl tab control to organize the page.
Step S360 then needs to obtain the information of current TabItem tab control if adopt the tab control to organize the page.
Step S370, the current self-defined control of multilist operation template retrieval obtain relevant information.
Step S380, multilist operation template are according to the relevant information that retrieves, Automatic Combined generate to a plurality of tables of data carry out multilist processing capacities such as association, deletion, modification, inquiry, page turning SQL statement, and generate function corresponding software automatically by generating the code that calls SQL statement automatically.

Claims (7)

1, a kind of software auto generating method based on template is characterized in that, comprises step:
A, a newly-increased template of handling list or data list;
B, the information that need carry out the data source of operational processes is set on template;
C, template are retrieved the various information that are provided with on it, the information Automatic Combined that obtains according to retrieval generates the SQL statement that list or data list are handled, and by generating the functional software that the code that calls SQL statement automatically generates processing list or data list automatically.
2, the software auto generating method based on template according to claim 1, it is characterized in that, also comprise before the step c: on template, acquire the self-defined control of data source being operated with template, and self-defined control and data source associated attributes information are set.
3, the software auto generating method based on template according to claim 1 is characterized in that, the list template of described template for list is handled;
Step b comprises:
B1, the self-defined control of the data source of on the list template, acquiring;
B2, the attribute information of the self-defined control of this data source is set;
Wherein, the attribute information among the step b2 comprises: be used to specify the crucial name attribute of title of the key word of data source, and be used for specified data and be derived from the data source property that the definition control is specifically operated which table or view.
4, the software auto generating method based on template according to claim 1 is characterized in that, described template is the data list template of deal with data tabulation;
Step b comprises:
B1, the newly-increased Xml file that is used for the record data list information and shines upon with the data list template;
B2, the cell attribute information of data source is set in the Xml file.
5, software auto generating method based on template according to claim 4, it is characterized in that described cell attribute information comprises: the attribute information of the title of expression cell, the attribute information of the field name in expression corresponding data source, whether the expression cell visible attribute information, whether the expression cell is read-only attribute information, the display mode of expression cell is the attribute information of text box or check box or drop-down list or image or button, the attribute information of expression data type, the attribute information of the regular expression rule of the attribute information of expression cell length or expression text box content.
6, the software auto generating method based on template according to claim 1 is characterized in that, described template is for handling the multilist operation template of a plurality of tables of data that are mutually related;
Step b comprises: acquiring 2 on multilist operation template, to be respectively applied for each data source of decision be the list expression way or the self-defined control of data list expression way, and the attribute that these 2 self-defined controls are set is provided with the relevance of a plurality of tables of data.
7, the software auto generating method based on template according to claim 6, it is characterized in that, also comprise before the step b: judge whether multilist operation template adopts TabControl tab control to organize the page, if then need further to obtain the information of current TabItem tab control.
CNA2008101420279A 2008-08-22 2008-08-22 Software auto generating method based on template Pending CN101398755A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008101420279A CN101398755A (en) 2008-08-22 2008-08-22 Software auto generating method based on template

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008101420279A CN101398755A (en) 2008-08-22 2008-08-22 Software auto generating method based on template

Publications (1)

Publication Number Publication Date
CN101398755A true CN101398755A (en) 2009-04-01

Family

ID=40517334

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008101420279A Pending CN101398755A (en) 2008-08-22 2008-08-22 Software auto generating method based on template

Country Status (1)

Country Link
CN (1) CN101398755A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291491A (en) * 2011-08-18 2011-12-21 深圳市融创天下科技股份有限公司 Form control and terminal equipment comprising same
CN103399528A (en) * 2013-03-06 2013-11-20 中国电力科学研究院 Automatic generation method for Modbus slave-station simulator system
CN103412868A (en) * 2013-07-02 2013-11-27 福建榕基软件股份有限公司 Method and device for generating document
CN105487864A (en) * 2015-11-26 2016-04-13 北京京东尚科信息技术有限公司 Method and device for automatically generating code
CN105701183A (en) * 2016-01-07 2016-06-22 无锡天脉聚源传媒科技有限公司 User personalized template implementation method and apparatus
CN108469953A (en) * 2018-03-13 2018-08-31 深圳市易聆科信息技术股份有限公司 A kind of generation method of page table list, server and storage medium
CN109254774A (en) * 2018-08-30 2019-01-22 郑州云海信息技术有限公司 The management method and device of code in software development system
CN111625219A (en) * 2020-05-22 2020-09-04 杭州指令集智能科技有限公司 BO component processing method, device and equipment
CN113609826A (en) * 2021-07-14 2021-11-05 远景智能国际私人投资有限公司 Form processing method and device

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291491A (en) * 2011-08-18 2011-12-21 深圳市融创天下科技股份有限公司 Form control and terminal equipment comprising same
CN102291491B (en) * 2011-08-18 2015-07-15 融创天下(上海)科技发展有限公司 Form control and terminal equipment comprising same
CN103399528B (en) * 2013-03-06 2016-05-25 中国电力科学研究院 A kind of automatic generation method of Modbus slave station simulation system
CN103399528A (en) * 2013-03-06 2013-11-20 中国电力科学研究院 Automatic generation method for Modbus slave-station simulator system
CN103412868B (en) * 2013-07-02 2016-06-15 福建榕基软件股份有限公司 Document generates method and device
CN103412868A (en) * 2013-07-02 2013-11-27 福建榕基软件股份有限公司 Method and device for generating document
CN106055528A (en) * 2013-07-02 2016-10-26 福建榕基软件股份有限公司 Automatic generation method and apparatus of documents
CN105487864A (en) * 2015-11-26 2016-04-13 北京京东尚科信息技术有限公司 Method and device for automatically generating code
CN105487864B (en) * 2015-11-26 2019-06-04 北京京东尚科信息技术有限公司 The method and apparatus of Code automatic build
CN105701183A (en) * 2016-01-07 2016-06-22 无锡天脉聚源传媒科技有限公司 User personalized template implementation method and apparatus
CN108469953A (en) * 2018-03-13 2018-08-31 深圳市易聆科信息技术股份有限公司 A kind of generation method of page table list, server and storage medium
CN109254774A (en) * 2018-08-30 2019-01-22 郑州云海信息技术有限公司 The management method and device of code in software development system
CN111625219A (en) * 2020-05-22 2020-09-04 杭州指令集智能科技有限公司 BO component processing method, device and equipment
CN113609826A (en) * 2021-07-14 2021-11-05 远景智能国际私人投资有限公司 Form processing method and device
CN113609826B (en) * 2021-07-14 2024-01-09 远景智能国际私人投资有限公司 Form processing method and device

Similar Documents

Publication Publication Date Title
CN101398755A (en) Software auto generating method based on template
US20080250055A1 (en) Method and Device for Coding a Hierarchized Document
CN108021632B (en) Mutual conversion processing method for unstructured data and structured data
US20090192838A1 (en) System and method for optimizing response handling time and customer satisfaction scores
CN104679826A (en) Classification model-based context recognition method and system
WO2015118709A1 (en) Information processing device, information processing program, storage medium, and information processing method
CN103473216A (en) Excel-based product process planning method
CN110362596A (en) A kind of control method and device of text Extracting Information structural data processing
CN113010169A (en) Method and apparatus for converting UI diagram into code file
CN101753619B (en) Method and system for extending service model
CN109693244B (en) Method and device for optimizing conversation robot
CN115358204A (en) Report generation method and device, electronic equipment and storage medium
JP2014174728A (en) Cost calculation device, cost calculation method, and program
CN108984156A (en) A kind of software auto generating method and system for exempting from code development based on template
JP5943356B2 (en) Information processing apparatus, information processing method, and program
JP2007293723A (en) Database managing system and managing method
CN112817592A (en) Automatic code generation method based on entity annotation
WO2023007791A1 (en) Program code automatic generation system
CN104407853A (en) Method for realizing TABLE multi-line simultaneous edition
CN112668293B (en) Data report processing method
US20200320250A1 (en) Systems and Methods for Generating Logical Documents for a Document Evaluation System
CN103699384A (en) Rapid development method for project process management and data content management
CN111932412A (en) Contract drafting and revising method, device, storage medium and equipment
JP2016143106A (en) Business influence portion extraction method based on business variation and business influence portion extraction device
JP2008158727A (en) Electronic business form system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20090401