CN107678740A - A kind of method for packing and computer equipment of UI Service Component - Google Patents

A kind of method for packing and computer equipment of UI Service Component Download PDF

Info

Publication number
CN107678740A
CN107678740A CN201711014122.6A CN201711014122A CN107678740A CN 107678740 A CN107678740 A CN 107678740A CN 201711014122 A CN201711014122 A CN 201711014122A CN 107678740 A CN107678740 A CN 107678740A
Authority
CN
China
Prior art keywords
control
data set
collection
type
packing
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
CN201711014122.6A
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.)
Fujian Star Software Co Ltd
Original Assignee
Fujian Star Software Co 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 Fujian Star Software Co Ltd filed Critical Fujian Star Software Co Ltd
Priority to CN201711014122.6A priority Critical patent/CN107678740A/en
Publication of CN107678740A publication Critical patent/CN107678740A/en
Pending legal-status Critical Current

Links

Classifications

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

Abstract

The present invention provides a kind of method for packing of UI Service Component, including:Step 1, the establishment to the control collection of window and layout are packaged, including the incoming data set for creating control collection, one control is created according to each object data in the data set, and grid style layout is pressed, each object data includes control type, control property, control value, control title, controls tab, control constrained type and control event processing callback method title in the data set;Step 2, the establishment of introducing control collection and layout method for packing in window interface program code, by generating the data set for the control collection for needing to create, and call the establishment of control collection and layout method for packing that control collection corresponding to the data set is created and is laid out in the window interface.The present invention improves coarseness control collection rate of code reuse, reduces the program code that window interface control creates layout, improves development efficiency.

Description

A kind of method for packing and computer equipment of UI Service Component
Technical field
The present invention relates to a kind of method for packing of UI Service Component.
Background technology
Control is very more at present, have label, text box, date selection, combobox, single multiselect frame, tree-like, form, Button etc., and also have some improvement controls on many bases herein, although the fairly good use of these controls, directly use These controls realize the function of program, can cause the control program code of many redundancies, and such as each window has various controls Establishment, layout and to these control events handle code, it is necessary to controlled corresponding to each window inside program code The establishment layout of part, can produce substantial amounts of program code, control rate of code reuse is not high.
The content of the invention
One of the technical problem to be solved in the present invention, it is to provide a kind of method for packing of UI Service Component, improves coarse grain Control collection rate of code reuse is spent, reduces the program code that window interface control creates layout, improves development efficiency.
What one of the technical problem to be solved in the present invention was realized in:A kind of method for packing of UI Service Component, including:
Step 1, the establishment to the control collection of window and layout are packaged, and include the incoming data set for creating control collection, One control is created according to each object data in the data set, and presses grid style layout, every a pair in the data set Image data is included at control type, control property, control value, control title, controls tab, control constrained type and control event Manage callback method title;
Step 2, the establishment of introducing control collection and layout method for packing in window interface program code, passing through to generate needs The data set of the control collection of establishment, and call the establishment of control collection and be laid out method for packing control collection corresponding to the data set Create and be laid out in the window interface.
Further, the control type includes text box, combobox, radio box, multiselect frame, Table List and tree-like control Part.
Further, if the control type is text box, control constrained type, the control constrained type are reprocessed Including length;
If the control type is combobox, radio box or multiselect frame, corresponding control value is a mapping set;
If the control type is form, corresponding control value is a table objects array, the table objects number In group each object include table row first place claim, list data, row render callback method;
If the control type is Tree control, corresponding control value is node object array, and the node object Each object includes node data, title, Node Events callback method in array.
Further, also include before " creating a control according to each object data in the data set ":Create One father's container control.
The second technical problem to be solved by the present invention, it is to provide a kind of computer equipment, improves coarseness control collection generation Code reusability, the program code that window interface control creates layout is reduced, improve development efficiency.
What the second technical problem to be solved by the present invention was realized in:A kind of computer equipment, including memory, processing Device and storage are realized on a memory and the computer program that can run on a processor, during the computing device described program Following steps:
Step 1, the establishment to the control collection of window and layout are packaged, and include the incoming data set for creating control collection, One control is created according to each object data in the data set, and presses grid style layout, every a pair in the data set Image data is included at control type, control property, control value, control title, controls tab, control constrained type and control event Manage callback method title;
Step 2, the establishment of introducing control collection and layout method for packing in window interface program code, passing through to generate needs The data set of the control collection of establishment, and call the establishment of control collection and be laid out method for packing control collection corresponding to the data set Create and be laid out in the window interface.
Further, the control type includes text box, combobox, radio box, multiselect frame, Table List and tree-like control Part.
Further, if the control type is text box, control constrained type, the control constrained type are reprocessed Including length;
If the control type is combobox, radio box or multiselect frame, corresponding control value is a mapping set;
If the control type is form, corresponding control value is a table objects array, the table objects number In group each object include table row first place claim, list data, row render callback method;
If the control type is Tree control, corresponding control value is node object array, and the node object Each object includes node data, title, Node Events callback method in array.
Further, also include before " creating a control according to each object data in the data set ":Create One father's container control.
The invention has the advantages that:Encapsulated by Service Component, realize the coarseness multiplexing of control collection, improve program and open Send out efficiency, reduce the development time, window interface program only need tissue data and call method for packing can create, layout control It is integrated on window interface, greatly reduces control establishment, placement process code on window interface, reduce the construction cycle, save Development cost.
Brief description of the drawings
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is the inventive method execution flow chart.
Embodiment
Referring to Fig. 1, a kind of method for packing of UI Service Component, including:
Step 1, the establishment to the control collection of window and layout are packaged, and include the incoming data set for creating control collection, One control is created according to each object data in the data set, and presses grid style layout, every a pair in the data set Image data is included at control type, control property, control value, control title, controls tab, control constrained type and control event Manage callback method title;
Step 2, the establishment of introducing control collection and layout method for packing in window interface program code, passing through to generate needs The data set of the control collection of establishment, and call the establishment of control collection and be laid out method for packing control collection corresponding to the data set Create and be laid out in the window interface.
Preferably, the control type includes text box, combobox, radio box, multiselect frame, Table List and tree-like control Part.
If preferably, the control type is text box, control constrained type, the control constrained type bag are reprocessed Include length;
If the control type is combobox, radio box or multiselect frame, corresponding control value is a mapping set;
If the control type is form, corresponding control value is a table objects array, the table objects number In group each object include table row first place claim, list data, row render callback method;
If the control type is Tree control, corresponding control value is node object array, and the node object Each object includes node data, title, Node Events callback method in array.
Preferably, also include before " creating a control according to each object data in the data set ":Create one Individual father's container control.
A kind of computer equipment of the present invention, including memory, processor and storage are on a memory and can be in processor The computer program of upper operation, following steps are realized during the computing device described program:
Step 1, the establishment to the control collection of window and layout are packaged, and include the incoming data set for creating control collection, One control is created according to each object data in the data set, and presses grid style layout, every a pair in the data set Image data is included at control type, control property, control value, control title, controls tab, control constrained type and control event Manage callback method title;
Step 2, the establishment of introducing control collection and layout method for packing in window interface program code, passing through to generate needs The data set of the control collection of establishment, and call the establishment of control collection and be laid out method for packing control collection corresponding to the data set Create and be laid out in the window interface.
Preferably, the control type includes text box, combobox, radio box, multiselect frame, Table List and tree-like control Part.
If preferably, the control type is text box, control constrained type, the control constrained type bag are reprocessed Include length etc. (must such as fill out);
If the control type is combobox, radio box or multiselect frame, corresponding control value is a mapping set;
If the control type is form, corresponding control value is a table objects array, the table objects number In group each object include table row first place claim, list data, row render callback method;
If the control type is Tree control, corresponding control value is node object array, and the node object Each object includes node data, title, Node Events callback method in array.
Preferably, also include before " creating a control according to each object data in the data set ":Create one Individual father's container control, is easy to the establishment of the controls such as combobox.
With reference to a specific embodiment, the present invention will be further described:
The establishment to the control collection of window is packaged with layout in advance, introduces control in window interface program code afterwards The establishment of part collection and layout method for packing, as long as the data set as needed for the control collection that prespecified form generation creates, is adjusted Control collection corresponding to the data set is created with the establishment and layout method for packing of control collection and is laid out the window interface In.
Wherein, each object information in the data set includes:Control type, control property, control value, control name Title, controls tab, control constrained type and control event processing callback method title;According to data set in a window interface The establishment of control collection, layout method for packing is called to perform as follows:
Father's container control is first created, then loop-around data concentrates each one control of Object Creation, and presses grid wind Lattice are filled, such as fill a control by every a line, until having created all controls;
When creating a control, first handle control type, the control type include text box, combobox, radio box, Multiselect frame, Table List and Tree control (such as catalogue);
Reprocess control constrained type, for example, must fill out, length, data type etc. are used for bound control;
When control type is combobox, radio box or multiselect frame, corresponding control value is a mapping set, works as control When type is form, corresponding control value is a table objects array, and each object includes table row head in table objects array Title, list data, row render callback method, when control type is Tree control, then corresponding control value is node object Array, and each object includes node data, title, Node Events callback method in the node object array;
It is not presented to above-mentioned for empty control value in corresponding control, if control value is space-time, shows blank value;
And remind user to correspond to the specific requirement that control is filled in by controls tab, such as when an input frame needs are defeated Enter name, and require when be Chinese character, then marked on the input frame label substance be "<Name>, middle word please be fill in Symbol ".
Developer only needs to create a simple window interface framework, is generated in the program code of window interface real The data set of border parameter simultaneously calls control method for packing to realize establishment to all controls and layout, i.e., according to business datum and right The method that business datum is operated created to control, is laid out and the encapsulation of event handling, calls wherein method for packing to enter The establishment of row control, control is operated accordingly according to callback method, so there is no need in journey corresponding to each window Establishment, the layout operation of control are carried out in sequence code, reduces many cumbersome codes, reaches interface service level reuse and interface Control creates and the loose coupling of program traffic logic.
Although the foregoing describing the embodiment of the present invention, those familiar with the art should manage Solution, the specific embodiment described by us are merely exemplary, rather than for the restriction to the scope of the present invention, are familiar with this The equivalent modification and change that the technical staff in field is made in the spirit according to the present invention, should all cover the present invention's In scope of the claimed protection.

Claims (8)

  1. A kind of 1. method for packing of UI Service Component, it is characterised in that:Including:
    Step 1, the establishment to the control collection of window and layout are packaged, and include the incoming data set for creating control collection, according to Each object data creates a control in the data set, and presses grid style layout, each number of objects in the data set Handled back according to including control type, control property, control value, control title, controls tab, control constrained type and control event Adjust method name;
    Step 2, the establishment of introducing control collection and layout method for packing in window interface program code, need to create by generation Control collection data set, and call control collection establishment and layout method for packing control collection corresponding to the data set is created And it is laid out into the window interface.
  2. A kind of 2. method for packing of UI Service Component according to claim 1, it is characterised in that:The control type includes Text box, combobox, radio box, multiselect frame, Table List and Tree control.
  3. A kind of 3. method for packing of UI Service Component according to claim 1, it is characterised in that:
    If the control type is text box, control constrained type is reprocessed, the control constrained type includes length;
    If the control type is combobox, radio box or multiselect frame, corresponding control value is a mapping set;
    If the control type is form, corresponding control value is a table objects array, in the table objects array Each object includes that table row first place claims, list data, row render callback method;
    If the control type is Tree control, corresponding control value is node object array, and the node object array In each object include node data, title, Node Events callback method.
  4. A kind of 4. method for packing of UI Service Component according to claim 1, it is characterised in that:" according to the data Each object data is concentrated to create a control " also include before:Create father's container control.
  5. 5. a kind of computer equipment, including memory, processor and storage are on a memory and the meter that can run on a processor Calculation machine program, it is characterised in that realize following steps during the computing device described program:
    Step 1, the establishment to the control collection of window and layout are packaged, and include the incoming data set for creating control collection, according to Each object data creates a control in the data set, and presses grid style layout, each number of objects in the data set Handled back according to including control type, control property, control value, control title, controls tab, control constrained type and control event Adjust method name;
    Step 2, the establishment of introducing control collection and layout method for packing in window interface program code, need to create by generation Control collection data set, and call control collection establishment and layout method for packing control collection corresponding to the data set is created And it is laid out into the window interface.
  6. A kind of 6. computer equipment according to claim 5, it is characterised in that:The control type include text box, under Draw frame, radio box, multiselect frame, Table List and Tree control.
  7. A kind of 7. computer equipment according to claim 5, it is characterised in that:If the control type is text box, Control constrained type is reprocessed, the control constrained type includes length;
    If the control type is combobox, radio box or multiselect frame, corresponding control value is a mapping set;
    If the control type is form, corresponding control value is a table objects array, in the table objects array Each object includes that table row first place claims, list data, row render callback method;
    If the control type is Tree control, corresponding control value is node object array, and the node object array In each object include node data, title, Node Events callback method.
  8. A kind of 8. computer equipment according to claim 5, it is characterised in that:" according to every a pair in the data set Image data creates a control " also include before:Create father's container control.
CN201711014122.6A 2017-10-26 2017-10-26 A kind of method for packing and computer equipment of UI Service Component Pending CN107678740A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711014122.6A CN107678740A (en) 2017-10-26 2017-10-26 A kind of method for packing and computer equipment of UI Service Component

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711014122.6A CN107678740A (en) 2017-10-26 2017-10-26 A kind of method for packing and computer equipment of UI Service Component

Publications (1)

Publication Number Publication Date
CN107678740A true CN107678740A (en) 2018-02-09

Family

ID=61142287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711014122.6A Pending CN107678740A (en) 2017-10-26 2017-10-26 A kind of method for packing and computer equipment of UI Service Component

Country Status (1)

Country Link
CN (1) CN107678740A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109799994A (en) * 2019-01-14 2019-05-24 腾讯科技(武汉)有限公司 A kind of terminal assembly generation method and device
WO2020006910A1 (en) * 2018-07-02 2020-01-09 平安科技(深圳)有限公司 Business componentization development method and apparatus, computer device, and storage medium
CN111240680A (en) * 2020-01-14 2020-06-05 广州华多网络科技有限公司 Button creating method and device, computer equipment and storage medium
CN111857717A (en) * 2020-07-29 2020-10-30 网易(杭州)网络有限公司 UI editing method, device, equipment and computer readable storage medium
CN113721812A (en) * 2021-08-05 2021-11-30 中核武汉核电运行技术股份有限公司 Nuclear power plant data drop-down box component creation method and system based on acts
CN113761415A (en) * 2020-11-24 2021-12-07 北京沃东天骏信息技术有限公司 Page display method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043626A (en) * 2010-12-23 2011-05-04 中国农业银行股份有限公司 Method and device for encapsulating extjs component, and method and system for generating user interface
CN103309659A (en) * 2013-05-24 2013-09-18 天津市天安怡和信息技术有限公司 User interface dynamic generation method and device based on rich client platform
US20130263280A1 (en) * 2012-01-09 2013-10-03 Stephen W. Cote Secure Dynamic Page Content and Layouts Apparatuses, Methods and Systems
CN103902256A (en) * 2012-12-24 2014-07-02 航天信息股份有限公司 Interface generating system and method
CN103995698A (en) * 2014-05-05 2014-08-20 重庆斯欧信息技术有限公司 Application form agile development method and system oriented to business
CN105426204A (en) * 2015-11-05 2016-03-23 浪潮软件集团有限公司 Web high-speed loading rendering method based on domestic CPU, operating system and browser
CN106201458A (en) * 2016-06-27 2016-12-07 上海波汇科技股份有限公司 A kind of interface creating method can joined flexibly and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043626A (en) * 2010-12-23 2011-05-04 中国农业银行股份有限公司 Method and device for encapsulating extjs component, and method and system for generating user interface
US20130263280A1 (en) * 2012-01-09 2013-10-03 Stephen W. Cote Secure Dynamic Page Content and Layouts Apparatuses, Methods and Systems
CN103902256A (en) * 2012-12-24 2014-07-02 航天信息股份有限公司 Interface generating system and method
CN103309659A (en) * 2013-05-24 2013-09-18 天津市天安怡和信息技术有限公司 User interface dynamic generation method and device based on rich client platform
CN103995698A (en) * 2014-05-05 2014-08-20 重庆斯欧信息技术有限公司 Application form agile development method and system oriented to business
CN105426204A (en) * 2015-11-05 2016-03-23 浪潮软件集团有限公司 Web high-speed loading rendering method based on domestic CPU, operating system and browser
CN106201458A (en) * 2016-06-27 2016-12-07 上海波汇科技股份有限公司 A kind of interface creating method can joined flexibly and system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020006910A1 (en) * 2018-07-02 2020-01-09 平安科技(深圳)有限公司 Business componentization development method and apparatus, computer device, and storage medium
CN109799994A (en) * 2019-01-14 2019-05-24 腾讯科技(武汉)有限公司 A kind of terminal assembly generation method and device
CN111240680A (en) * 2020-01-14 2020-06-05 广州华多网络科技有限公司 Button creating method and device, computer equipment and storage medium
CN111240680B (en) * 2020-01-14 2023-06-06 广州华多网络科技有限公司 Button creation method, button creation device, computer device and storage medium
CN111857717A (en) * 2020-07-29 2020-10-30 网易(杭州)网络有限公司 UI editing method, device, equipment and computer readable storage medium
CN111857717B (en) * 2020-07-29 2023-09-12 网易(杭州)网络有限公司 UI editing method, device, equipment and computer readable storage medium
CN113761415A (en) * 2020-11-24 2021-12-07 北京沃东天骏信息技术有限公司 Page display method and device
CN113721812A (en) * 2021-08-05 2021-11-30 中核武汉核电运行技术股份有限公司 Nuclear power plant data drop-down box component creation method and system based on acts

Similar Documents

Publication Publication Date Title
CN107678740A (en) A kind of method for packing and computer equipment of UI Service Component
US20130238982A1 (en) Methods and apparatus for editing an application webpage
CN104685466B (en) For providing the browser level background pages of multiple views
CN102495735A (en) Web end UI (user interface) component application frame system
CN105354237A (en) Business data display method
CN105637478A (en) Computer-aided development of native mobile application code
CN106062711A (en) Compound controls
CN108228288A (en) A kind of component system and its call method and device
CN105701183A (en) User personalized template implementation method and apparatus
CN108021400A (en) Data processing method and device, computer-readable storage medium and equipment
CN115712413A (en) Low code development method, device, equipment and storage medium
CN105183466A (en) Encapsulating method for simplifying echarts invocation
CN108628604A (en) The parameter value generation method and system of SOA request messages
CN107943455A (en) A kind of list rendering system based on JSON data formats
CN113407254B (en) Form generation method and device, electronic equipment and storage medium
CN106528115A (en) Visualized interface development method and device
WO2024066825A1 (en) Page project development method, apparatus, device, medium and product
CN113641719A (en) Data processing method, data processing device, computer and storage medium
CN108241491A (en) A kind of Composing Method of Mixing and device
CN101595470A (en) The method and apparatus that is used for managing system specifications
CN105808236B (en) HMI picture element composition design and code generation method
CN106484413A (en) Document editor and document edit method
CN109800368A (en) H5 navigation bar push button configuration method, device, computer equipment and storage medium
CN106843819A (en) The method and device of object serialization
CN113688141B (en) Application function design method and software development platform

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