CN108073398A - A kind of configurable advice note realizes engine and method - Google Patents
A kind of configurable advice note realizes engine and method Download PDFInfo
- Publication number
- CN108073398A CN108073398A CN201711404348.7A CN201711404348A CN108073398A CN 108073398 A CN108073398 A CN 108073398A CN 201711404348 A CN201711404348 A CN 201711404348A CN 108073398 A CN108073398 A CN 108073398A
- Authority
- CN
- China
- Prior art keywords
- advice note
- data
- advice
- data item
- engine
- 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
Links
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
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
Abstract
The invention discloses a kind of configurable advice notes to realize engine.The configuration of advice note can be neatly realized using the present invention, scalability is strong, and development efficiency is high, reusability is good.The present invention defines file first with advice note and the type of pending advice note, data, executive mode, verification mode etc. is defined, then the page builder generation front end page of core engine is utilized, advice note content is filled in for user and is performed, with significant flexibility, all kinds of advice notes can be achieved, and it is maintainable high, the change of reply demand is freely;Scalability is high, and it is simpler to increase new notice single function;Development efficiency is high, and amendment advice list defines file;And study cost is low, need to only learn application engine and be realized without paying close attention to engine internal.
Description
Technical field
The present invention relates to field of computer technology, and in particular to a kind of configurable advice note realizes engine and method.
Background technology
Advice note, i.e., all kinds of orders, the abbreviation of notice are that personnel increase newly, change maintenance, relation of the supply switching and nullify
Voucher, while be also the foundation that each business department accordingly ensures personnel.
Advice note mainly has several features in itself:One, numerous types, are such as increased newly, change, call in, recalled by existing 28 kinds
Deng;Two, the corresponding typing information of all kinds of advice notes and processing rule are different but also have general character that can say;Three, with business demand
And become, excursion, which is related to, increases type, Suitable content, change rule.
It is mainly at present by the way of hard coded, as shown in Figure 1, there are all to the implementation method of advice note business function
It is mostly insufficient:
1st, lead one and start whole body, changing slight data item needs the logical code changed foreground code, realized, workload phase
It is inefficient to larger;
2nd, the reusability of code is almost nil, and newly increasing a kind of advice note can only develop a set of again, including front end, patrol
It collects, backstage, lacks flexibility ratio;
3rd, logic association is close, and autgmentability is poor;
4th, logical layer and presentation layer are encoded separately, and waste of human resource and construction cycle is caused to elongate.
Therefore it is badly in need of studying a kind of new development approach, applied to advice note, adapts to its changes in demand, fundamentally replace
For hard coded, above-mentioned all problems are solved.
The content of the invention
In view of this, the present invention provides a kind of configurable advice notes to realize engine, can neatly realize advice note
Configuration, scalability is strong, and development efficiency is high, reusability is good.
The configurable advice note of the present invention realizes engine, and file and core engine are defined including advice note;Wherein, notify
Single file that defines uses advice note type, data item and foreground displaying attribute of the XML format to pending advice note, background process
Logic is described;
Core engine includes document parser, page builder and core and realizes part;Wherein, document parser is used to solve
Analysis advice note defines the description of the pending advice note in file;Page builder is according to the number of the pending advice note parsed
It is inputted according to item and its foreground displaying attribute, generation front end page for user;Core realizes part according to the background process parsed
Logic carries out backstage verification, storage and abnormality processing to data input by user.
Further, the advice note type includes advice note type code, advice note title, advice note execution method.
Further, the data item and foreground displaying attribute include data item code, data item title, data type,
Default value, whether read-only, control type, control display width, data item initial value create-rule, the verification of data item foreground are patrolled
It collects and data referencing arranges.
Further, it is described for the data item code parsed, data item title, data type, default value, whether only
It reads, control type and control display width, page builder is directly by the content translation parsed into the corresponding labels of html
And tag attributes;
For universal data item initial value create-rule and check logic, page builder passes through pre defined attribute value
Mode be configured;For special type data item initial value create-rule relevant with business and check logic, page life
It grows up to be a useful person and code is write according to specific business, and quoted in advice note defines file by method name;
It is arranged for data referencing, page builder is by reading the class name and method name that data referencing arranges, by reflecting just
The object of the corresponding class of beginningization, and the method for call definition obtains binding data initialization related control.
Further, verified for universal backstage, core realizes that part is configured by pre defined attribute value;For
Special type backstage relevant with business verifies, and core realizes that check logic code is write in part according to specific business, and is notifying
Single define is quoted in file by method name;
Storage for data item, core realize that part carries out data item according to the whether existing advice note of database
It is inserted or updated.
The present invention also provides a kind of configurable advice note implementation methods, and advice note is generated using above-mentioned realization engine,
Include the following steps:
Step 1, file is defined using advice note pending advice note is described;
Step 2, document parser defines advice note the description of file and parses;Page builder is according to parsing
Data item and its foreground displaying attribute, generate front end page, core realize part according to the background process logic that parses to
The data of family input carry out backstage verification, storage and abnormality processing.
Advantageous effect:
(1) present invention first with advice note define file to the type of pending advice note, data, executive mode,
Verification mode etc. is defined, and then generates front end page using the page builder of core engine, advice note is filled in for user
Content simultaneously performs, and has significant flexibility, it can be achieved that all kinds of advice notes, and maintainable high, and the change of reply demand is freely;It can
Autgmentability is high, and it is simpler to increase new notice single function;Development efficiency is high, and amendment advice list defines file;And study generation
Valency is low, need to only learn application engine and be realized without paying close attention to engine internal.
(2) the method for the present invention realizes functional objective with minimum exploitation cost, saves human resources, shortens the construction cycle,
Consider that there is significant economic benefit from project cost.
Description of the drawings
Fig. 1 is existing implementation method schematic diagram.
Fig. 2 realizes engine schematic diagram for the present invention.
Specific embodiment
The present invention will now be described in detail with reference to the accompanying drawings and examples.
The present invention provides a kind of configurable advice notes to realize engine, and file and core engine group are defined by advice note
Into as shown in Figure 2.
Wherein, advice note defines file, advice note associated description information is defined using XML format, including three parts content:
First portion defines advice note type, and method is performed including advice note type code, advice note title, advice note;
Second portion, definition notice single data items and foreground displaying attribute, including data item code, data item title, number
According to type, default value, whether read-only, control type, control display width, data item initial value create-rule, data item foreground
Check logic, data referencing row;
Part III defines advice note background process logic, including each data item check logic, storage logic, exception
Reason.
Core engine is made of the realization of document parser, page builder and core.
Document parser:Parsing advice note defines the description in file;
Page builder:Front end page is operationally generated according to notice single data items and its foreground displaying attribute definition.
Data item code, data item title, data type, default value, the whether read-only, control class in file are defined for advice note
The attributes such as type, control display width, page builder translate directly into the corresponding labels of html and tag attributes;Data item is initial
Value create-rule is divided into general rule and business dependency rule, general rule is emptied including character string type, value type is set to 0,
The predefined rule such as perform mathematical calculations on the basis of initial value, and general rule can set data initial by pre defined attribute value
Value attribute, business dependency rule need specially treated, for example for class advice note of being transferred to another post, the initial value of professional level data item needs
Add one grade on the basis of former post grade, such case need to predefine initial value method for particular demands, and file is defined in advice note
Middle quoting method name is configured;Data item foreground check logic is divided into general check logic and special check logic, general school
Testing logic includes sentencing empty, input length check, regular expression verification etc., can be configured by pre defined attribute value, special
The general and specific business of check logic is related, need to write check logic code as the case may be, and define file in advice note
In quoted by method name;For control bundle back-end data, page builder is arranged data referencing row by reading data referencing
At the beginning of the class name and method name of definition initialize the object of corresponding class by reflecting, and the method for call definition obtains binding data
Beginningization related control, data referencing row are generally used for the data binding of the controls such as drop-down list, check box.
Core realizes part:According to advice note background process logical definition processing notification list service logic, including to user
Backstage verification, database purchase operation and the abnormality processing of the data item of input.Backstage verification is similar with foreground verification, is divided into logical
With check logic and special check logic, general check logic is configured by pre defined attribute value, special check logic root
Check logic code is write according to specific business, and is quoted in advice note defines file by method name;Database manipulation includes
Insertion and update two types, defining file in advice note can not explicitly be set, and core realizes that part logic can be according to notice
It is single whether existing to select inserted or updated operation;Abnormality processing is divided into general exception and self-defined exception, in advice note text
When Exception Type is not provided in part, handled in the exception of operation capture using general exception, if general exception cannot meet
The demand of certain class advice note then needs self-defined abnormality processing class, and is quoted in advice note defines file by class name.
It is illustrated below by taking type notification list of leaving one's post as an example.
Step 1: configuration is left one's post, the advice note of type notification list defines file:
First portion:Advice note type definition,
<TZD code=" 307 " name=" leaves one's post " validFunc=" valid30X " executeMethod="
execute3XX">
Second portion:Definition of data item, as personnel's categorical data item defines:
<Property code=" RYLB " name=" personnel's classification " dataType=" 1 " width=" 140 "
Readonly=" true " required=" true ">
Part III:Advice note background process logic is defined,
<Dropdown sourceModule=" org.nci.bzkpt.bzbm.TZD " sourceDataset="
Dataset_307_RYLB " labelField=" mingCheng " valueField=" daiMa " readFields="
MingCheng, daiMa " writeFields=" RYLB, RYLBDM "/>
Step 2: core engine parses, the front end for generating advice note shows and service logic and lasting data processing.
First, in system initialization, document parser parses type notification list of leaving one's post and defines file, reads type of leaving one's post
Advice note definition and its definition of data item simultaneously cache in memory.
<TZD>Tag definition is left one's post the code (code=" 307 ") of advice note, title (name=" leaving one's post "), verification side
Method (validFunc=" valid30X ") and execution method (executeMethod=" execute3XX ");
<property>Tag definition is left one's post the data item of advice note, by taking " personnel's type " data item as an example,<
property>Code (code=" RYLB "), title (name=" personnel's classification "), data type defined in label
Whether whether (dataType=" 1 "), foreground control width (width=" 140 ") read-only (readonly=" true ") and must
It fills out (required=" true ");
<dropdown>Label is used to illustrate that the value of " personnel's classification " data item to come from data dictionary (sourceModule
=" org.nci.bzkpt.bzbm.TZD "), and data dictionary is defined, the data set including data dictionary
(sourceDataset=" dataset_307_RYLB "), foreground show the field (readFields=" used
MingCheng, daiMa "), field (writeFields=" RYLB, RYLBDM ") that data use etc. is submitted to backstage.
Secondly, when notice single-page of leaving one's post is accessed by the user, page builder is according to the notice of leaving one's post cached in memory
Single definition and its definition of data item generation front end page.By taking " personnel's classification " data item as an example, the front end control of generation is one
Width is 140, the read-only and drop-down list that must fill out, and the numerical value of drop-down list comes from data set " dataset_307_RYLB ".
Finally, in user in the complete advice note and when submitting of leaving one's post of front end page input data editor, core realizes that part is adjusted
The data submitted with " valid30X () " method to user verify, and verification calls " execute3XX () " method after passing through
Carry out background business logic processing.
In conclusion these are only the preferable case study on implementation of the present invention, the protection model of the present invention is not intended to limit
It encloses.Within the spirit and principles of the invention, any modifications, equivalent replacements and improvements are made should be included in the present invention
Protection domain within.
Claims (6)
1. a kind of configurable advice note realizes engine, which is characterized in that defines file and core engine including advice note;Its
In, advice note define file using XML format to the advice note type, data item and foreground of pending advice note displaying attribute,
Background process logic is described;
Core engine includes document parser, page builder and core and realizes part;Wherein, document parser is logical for parsing
Know single description for defining the pending advice note in file;Page builder is according to the data item of the pending advice note parsed
And its foreground displaying attribute, generation front end page are inputted for user;Core realizes part according to the background process logic parsed
Backstage verification, storage and abnormality processing are carried out to data input by user.
2. the advice note that can configure as described in claim 1 realizes engine, which is characterized in that the advice note type includes logical
Know that single type code, advice note title, advice note perform method.
3. the advice note that can configure as described in claim 1 realizes engine, which is characterized in that the data item and foreground displaying
Attribute include data item code, data item title, data type, default value, whether read-only, control type, control display width,
Data item initial value create-rule, data item foreground check logic and data referencing row.
4. the advice note that can configure as claimed in claim 3 realizes engine, which is characterized in that described for the data parsed
Item code, data item title, data type, default value, whether read-only, control type and control display width, page generation
Device is directly by the content translation parsed into the corresponding labels of html and tag attributes;
The side for passing through pre defined attribute value for universal data item initial value create-rule and check logic, page builder
Formula is configured;For special type data item initial value create-rule relevant with business and check logic, page builder
Code is write according to specific business, and is quoted in advice note defines file by method name;
It is arranged for data referencing, page builder is initialized by reading the class name and method name that data referencing arranges by reflecting
The object of corresponding class, and the method for call definition obtains binding data initialization related control.
5. the advice note that can configure as described in claim 1 realizes engine, which is characterized in that it is verified for universal backstage,
Core realizes that part is configured by pre defined attribute value;It is verified for special type relevant with business backstage, core is realized
Check logic code is write in part according to specific business, and is quoted in advice note defines file by method name;
Storage for data item, core realize part according to the whether existing advice note of database to carry out inserting for data item
Enter or update.
6. a kind of configurable advice note implementation method, which is characterized in that using as claimed in any one of claims 1 to 5, wherein
It realizes the configuration of engine implementation advice note, includes the following steps:
Step 1, file is defined using advice note pending advice note is described;
Step 2, document parser defines advice note the description of file and parses;Page builder is according to the data parsed
Item and its foreground displaying attribute, generation front end page are inputted for user, and core is realized and partly patrolled according to the background process parsed
It collects and backstage verification, storage and abnormality processing is carried out to data input by user.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711404348.7A CN108073398A (en) | 2017-12-22 | 2017-12-22 | A kind of configurable advice note realizes engine and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711404348.7A CN108073398A (en) | 2017-12-22 | 2017-12-22 | A kind of configurable advice note realizes engine and method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108073398A true CN108073398A (en) | 2018-05-25 |
Family
ID=62155386
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711404348.7A Pending CN108073398A (en) | 2017-12-22 | 2017-12-22 | A kind of configurable advice note realizes engine and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108073398A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114997186A (en) * | 2021-09-02 | 2022-09-02 | 荣耀终端有限公司 | Control method of translation control and electronic equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080222199A1 (en) * | 2007-03-06 | 2008-09-11 | Tiu William K | Multimedia Aggregation in an Online Social Network |
CN101706716A (en) * | 2009-09-08 | 2010-05-12 | 南京师范大学 | VO-based form customization, configuration and parsing operation method |
CN103761103A (en) * | 2014-01-26 | 2014-04-30 | 曙光云计算技术有限公司 | Method and system for defining and instantiating cloud computing platform service |
CN106020793A (en) * | 2016-05-09 | 2016-10-12 | 统通信(苏州)有限公司 | A method for rapid form building in an iOS platform application development process |
CN106354748A (en) * | 2016-08-15 | 2017-01-25 | 北京数码视讯科技股份有限公司 | Webpage generation method and device |
CN106371825A (en) * | 2016-08-23 | 2017-02-01 | 武大吉奥信息技术有限公司 | Dynamic form generation method and apparatus for mobile end application interface |
-
2017
- 2017-12-22 CN CN201711404348.7A patent/CN108073398A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080222199A1 (en) * | 2007-03-06 | 2008-09-11 | Tiu William K | Multimedia Aggregation in an Online Social Network |
CN101706716A (en) * | 2009-09-08 | 2010-05-12 | 南京师范大学 | VO-based form customization, configuration and parsing operation method |
CN103761103A (en) * | 2014-01-26 | 2014-04-30 | 曙光云计算技术有限公司 | Method and system for defining and instantiating cloud computing platform service |
CN106020793A (en) * | 2016-05-09 | 2016-10-12 | 统通信(苏州)有限公司 | A method for rapid form building in an iOS platform application development process |
CN106354748A (en) * | 2016-08-15 | 2017-01-25 | 北京数码视讯科技股份有限公司 | Webpage generation method and device |
CN106371825A (en) * | 2016-08-23 | 2017-02-01 | 武大吉奥信息技术有限公司 | Dynamic form generation method and apparatus for mobile end application interface |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114997186A (en) * | 2021-09-02 | 2022-09-02 | 荣耀终端有限公司 | Control method of translation control and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Bork et al. | A survey of modeling language specification techniques | |
US10699071B2 (en) | Systems and methods for template based custom document generation | |
Antkiewicz et al. | FeaturePlugin: Feature modeling plug-in for Eclipse | |
CN101794226B (en) | Service software construction method and system adapting to multiple business abstraction levels | |
US8578265B2 (en) | Methods and apparatus for generating a dynamic document | |
Granada et al. | Analysing the cognitive effectiveness of the WebML visual notation | |
CN107886439A (en) | Insurance products development approach, device, equipment and computer-readable recording medium | |
CN102117202B (en) | J2EE architecture-based code generating device | |
CN110020307A (en) | A kind of method for drafting and device of client's end-view | |
Bjekovic et al. | Towards a coherent enterprise modelling landscape | |
US20100223214A1 (en) | Automatic extraction using machine learning based robust structural extractors | |
CN102722519A (en) | Techniques to create structured document templates using enhanced content controls | |
CN102693127B (en) | Data-driven schema for describing and executing management tasks in a graphical user interface | |
JP2003529829A (en) | Methods and systems for modeling legacy computer systems | |
JP2003532173A (en) | Method and system for applying an XML schema | |
CN103389992A (en) | Structured data storage method and device | |
CN104267966B (en) | The generation method and device of the program code of software | |
CN110489120A (en) | Page development method component-based and server | |
CN103646049A (en) | Method and system for automatically generating data report | |
US7483901B1 (en) | System and method for data transfer between two or more connected software services | |
CN109445794A (en) | A kind of page building method and device | |
CN109299032B (en) | Data analysing method, electronic equipment and computer storage medium | |
CN108073398A (en) | A kind of configurable advice note realizes engine and method | |
CN105630839A (en) | Webpage information acquisition method and device | |
US9984175B2 (en) | Mapping non-generic markup language elements to generic object-oriented programming language objects |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20180525 |