CN103309659A - User interface dynamic generation method and device based on rich client platform - Google Patents

User interface dynamic generation method and device based on rich client platform Download PDF

Info

Publication number
CN103309659A
CN103309659A CN2013101983354A CN201310198335A CN103309659A CN 103309659 A CN103309659 A CN 103309659A CN 2013101983354 A CN2013101983354 A CN 2013101983354A CN 201310198335 A CN201310198335 A CN 201310198335A CN 103309659 A CN103309659 A CN 103309659A
Authority
CN
China
Prior art keywords
control
layout
interface
rich client
metadata
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
CN2013101983354A
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.)
TIANJIN TIANAN YIHE INFORMATION TECHNOLOGY Co Ltd
Original Assignee
TIANJIN TIANAN YIHE INFORMATION TECHNOLOGY 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 TIANJIN TIANAN YIHE INFORMATION TECHNOLOGY Co Ltd filed Critical TIANJIN TIANAN YIHE INFORMATION TECHNOLOGY Co Ltd
Priority to CN2013101983354A priority Critical patent/CN103309659A/en
Publication of CN103309659A publication Critical patent/CN103309659A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a user interface dynamic generation method and device based on a rich client platform. The method comprises the following steps: configuring metadata, and defining the page layout and a control; entering into the interface of the rich client platform, reading the configured metadata, setting the configured metadata, and generating the interface layout format; generating a control object through the defined control format, and generating the user interface of the rich client platform jointly by the control object and the page layout format. The device correspondingly comprises a configuration module, a first generation module and a second generation module. Through the configuration of the metadata, the definition of the page layout and the control on the interface is controlled, the code quantity is reduced, and the trouble due to recoding in modifying the interface is avoided, so that the code quantity of a programmer is reduced, the interface generation precision is improved, and the interface layout and the control are defined more clearly, so that various requirements in practical application are met.

Description

User interface dynamic creation method and generating apparatus thereof based on rich client
Technical field
The present invention relates to the dynamically generating user interfaces field, relate in particular to a kind of user interface dynamic creation method and generating apparatus thereof based on rich client.
Background technology
The Eclipse rich client is exactly to turn to the desktop application exploitation by developing plug, make up minimized Eclipse platform operation desktop application, needn't be that program frame is vexatious again, break away from AWT (Abstract Windowing Toolkit) and the Swing of failure, allow program have professional effect, and realize very simple, graceful.
For the developer, although using rich client is in order to develop desktop application, but bringing to the developer, rich client feels that more it has given full play to the advantage of plug-in unit system, rich client can be considered as the Initiative based on OSGi(Open Service Gateway) best practices that makes up the plug-in unit system instructs, wherein many methods for designing can be put in order and be become the Design Mode of doing the plug-in unit application system based on OSGi, from the design of rich client, may learn and how modularization is accomplished in application, mobilism is accomplished in application, even can also learn how automatically to generate the such design philosophy in interface.
In the prior art, the front-end interface of Eclipse rich client realizes the definition of interface layout and control by a large amount of java codes, and these java codes just can move after need to compiling.Just need the programmer to write a large amount of codes during practical application, and when the layout that needs the modification interface and control, just need to search source code, and recompility source code, a large amount of time and manpower have been wasted, and when recompilating source code, also can cause compile error, the user interface effect of generation is bad.
Summary of the invention
The invention provides a kind of user interface dynamic creation method and generating apparatus thereof based on rich client, the present invention does not need to recompilate source code, has saved time and manpower, and has avoided error rate, improved the generation effect of user interface, seen for details hereinafter and describe:
A kind of user interface dynamic creation method based on rich client, described method comprises:
Configure metadata defines layout and the control of the page;
When entering the rich client interface, read the metadata after the configuration, the metadata after the described configuration is arranged, generate the interface layout form;
Control form by definition generates the control class object, jointly generates the rich client user interface by described control class object and described interface layout form.
Described when entering the rich client interface, read the metadata after the configuration, the metadata after the described configuration is arranged, the process that generates the interface layout form is specially:
Search the control container node under the root node, obtain the container layout attributes in the control container node; According to the container layout attributes each property value is set; The form of putting according to control layout Node configuration control; Control under the traversal control container node arranges the mode that control shows according to the property value under the control in the control container.
Described control form by definition generates the control class object, and the process that jointly generates the rich client user interface by described control class object and described interface layout form is specially:
At first resolve the xml file, generate the control class object according to the control form that in xml, defines, put again the form of control by the container of xml definition, the control that defines is placed in the container, thereby generates the rich client user interface.
A kind of user interface dynamic generation apparatus based on rich client, described device comprises:
Configuration module is used for configure metadata, and layout and the control of the page defined;
The first generation module when being used for entering the rich client interface, reads the metadata after the configuration, and the metadata after the described configuration is arranged, and generates the interface layout form;
The second generation module is used for generating the control class object by the control form of definition, jointly generates the rich client user interface by described control class object and described interface layout form.
The beneficial effect of technical scheme provided by the invention is: the present invention passes through configure metadata, control the definition of control on the layout of the page and the interface, reduce size of code, when having avoided the modification interface, the trouble that recompile brings, and then reduced programmer's size of code, improved the precision that the interface generates, and when definition interfaces layout and control, more clear, satisfied the multiple needs in the practical application.
Description of drawings
Fig. 1 is the process flow diagram based on the user interface dynamic creation method of rich client;
Fig. 2 is the structural drawing based on the user interface dynamic generation apparatus of rich client.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, below embodiment of the present invention is described further in detail.
In order not need to recompilate source code, save time and manpower, the embodiment of the invention provides a kind of user interface dynamic creation method based on rich client, namely realize the operations such as definition of control in the layout, user interface of user interface by metadata, referring to Fig. 1, see for details hereinafter and describe:
101: configure metadata defines layout and the control of the page;
The operating process of this step is specially: the node of definition metadata is each node distributive property.
Definition root node composite is the root node of meta data file, and the metadata in the embodiment of the invention all describes as an example of xml example.
Definition interfaces arrangement nodes layout is the layout types of user interface, and the father node of layout node is composite.
Definition grid node Grid is the grid layout at interface, and the father node of Grid node is layout.
Definition format node style, this form node style can further define grid node Grid, arrangement nodes layout and row layout row, and the form node style under the grid node Grid is used for defining the form of grid; Form node style under the arrangement nodes layout is used for defining control at the form of putting of grid; Form node style under the row layout row be used for the definition line layout towards (for example: walk crosswise or perpendicular row).
Definition row node numColumns is the number of mesh column, and the father node of row node numColumns is grid node Grid.
The definition row wait wide node makeColumnsEqualWidth, namely whether all row all are forced to same width, and default value is false, and it is grid node Grid that row wait the father node of wide node makeColumnsEqualWidth.
Definition control layout node layoutData, the pattern of putting for control in the grid layout, the father node of control layout node layoutData is grid node Grid, and the property value of control layout node layoutData is name, knows the concrete pattern of putting by name.
Figure BDA00003246902000031
Definition control columns node horizontalSpan is the columns of the shared grid layout of control, and the father node of control columns node horizontalSpan is control layout node layoutData.
Definition control minimum widith node widthHint, the father node of control minimum widith node widthHint is control layout node layoutData.
Definition control line number node verticalSpan is the line number of the shared grid layout of control, and the father node of control line number node verticalSpan is control layout node layoutData.
Definition control minimum constructive height node heightHint, the father node of control minimum constructive height node heightHint is control layout node layoutData.
Definition interfaces is filled arrangement nodes Fill, and the father node that arrangement nodes Fill is filled at the interface is interface layout node layout.
The capable arrangement nodes row of definition interfaces, the father node of row arrangement nodes row is interface layout node layout.
Definition control container node controls, attribute comprises: layout container layout, whether enabled is available, the title of name container, the value of data container, the class of class container operation, the father node of control container node controls is root node composite.For example: by the layout type of layout container layout setting multiselect frame in container, whether Enabled can represent folding available usually, and name is the title of Folding frame, and Data is when you get this Foldable container, the value of getting.Class is when the multiselect frame below you select, the class of triggering, the code that carry out.
Definition control node control, attribute comprises: the unique sign of id, name title, type control type, layoutData layout title, whether enabled is available, whether isedit can edit, and the father node of control node control is control container node controls.Illustrate: isedit just arranges for drop-down text box.For example: Id: unique sign in this space is set, and Type refers to the type of control, is text box, or combobox etc.LayoutData refers to that this control puts pattern in container.Enabled refers to whether this control is available, such as text box, when being set to false, this text box becomes ash, can not input.Whether isedit just arranges for drop-down text box, be to control the library frame can input value.
When the control type was form, this method also comprised: definition list head node item, Id are unique signs, and value is the demonstration of gauge outfit, and size is the width of gauge outfit, and the father node of gauge outfit node i tem is control.
When the control type was drop-down list, this method also comprised: define drop-down value node value, attribute comprises: the value that data hides, and whether check is selected, and the value among the drop-down value node value is the value that shows.
102: when entering the rich client interface, read the metadata after the configuration, the metadata after the configuration is arranged, generate the interface layout form;
Wherein, the metadata after the configuration is arranged, the process that generates the interface layout form is specially:
1) searches control container node controls under the root node composite, obtain the layout container layout attributes among the control container node controls;
2) according to layout container layout attributes each property value under the layout mark is set;
Figure BDA00003246902000051
Can find out the layout format that control container is set with wide node makeColumnsEqualWidth such as form node style, row node numColums and row from above-mentioned code, namely set up 6 row wide.
3) form of putting of control is set according to control layout node layoutData;
For example:
Can find out that by above-mentioned code the put form style of control in grid is FILL_HORIZONTAL, namely fill row, the columns node is horizontalSpan〉1</horizontalSpan, namely columns is 1, and column width is not done setting.
4) the control control under the traversal control container node controls arranges the mode that control shows according to the property value under the control control in the control container.
For example:
Figure BDA00003246902000053
Can find out that by above-mentioned code the unique identification id of control is zqtgdm, control be described as the bond Managed Code, the type of control is text, to be grid1(describe referring to the grid1 of step 3) the inside the form of putting of control), control is effectively can use, and can edit.
103: the control form by definition generates the control class object, jointly generates the rich client user interface by control class object and interface layout form.
At first resolve the xml file, generate the control class object according to the control form that in xml, defines, put again the form of control by the container of xml definition, the control that defines is placed in the container, thereby generates the interface.
A kind of user interface dynamic generation apparatus based on rich client, referring to Fig. 2, this device comprises:
Configuration module is used for configure metadata, and layout and the control of the page defined;
The first generation module when being used for entering the rich client interface, reads the metadata after the configuration, and the metadata after the configuration is arranged, and generates the interface layout form;
The second generation module is used for generating the control class object by the control form of definition, jointly generates the rich client user interface by control class object and interface layout form.
The present embodiment can carry out the technical scheme of embodiment of the method shown in Figure 1 based on the user interface dynamic generation apparatus of rich client, it realizes that principle is similar, repeats no more herein.
In sum, user interface creating method and generating apparatus by foregoing description can conveniently generate the needed interface of user, do not need code is re-started editor, have saved the time, have reduced error rate.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the invention described above embodiment sequence number does not represent the quality of embodiment just to description.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (4)

1. the user interface dynamic creation method based on rich client is characterized in that, described method comprises:
Configure metadata defines layout and the control of the page;
When entering the rich client interface, read the metadata after the configuration, the metadata after the described configuration is arranged, generate the interface layout form;
Control form by definition generates the control class object, jointly generates the rich client user interface by described control class object and described interface layout form.
2. the user interface dynamic creation method based on rich client according to claim 1, it is characterized in that, described when entering the rich client interface, read the metadata after the configuration, metadata after the described configuration is arranged, and the process that generates the interface layout form is specially:
Search the control container node under the root node, obtain the container layout attributes in the control container node; According to the container layout attributes each property value is set; The form of putting according to control layout Node configuration control; Control under the traversal control container node arranges the mode that control shows according to the property value under the control in the control container.
3. the user interface dynamic creation method based on rich client according to claim 1, it is characterized in that, described control form by definition generates the control class object, and the process that jointly generates the rich client user interface by described control class object and described interface layout form is specially:
At first resolve the xml file, generate the control class object according to the control form that in xml, defines, put again the form of control by the container of xml definition, the control that defines is placed in the container, thereby generates the rich client user interface.
4. the user interface dynamic generation apparatus based on rich client is characterized in that, described device comprises:
Configuration module is used for configure metadata, and layout and the control of the page defined;
The first generation module when being used for entering the rich client interface, reads the metadata after the configuration, and the metadata after the described configuration is arranged, and generates the interface layout form;
The second generation module is used for generating the control class object by the control form of definition, jointly generates the rich client user interface by described control class object and described interface layout form.
CN2013101983354A 2013-05-24 2013-05-24 User interface dynamic generation method and device based on rich client platform Pending CN103309659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013101983354A CN103309659A (en) 2013-05-24 2013-05-24 User interface dynamic generation method and device based on rich client platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013101983354A CN103309659A (en) 2013-05-24 2013-05-24 User interface dynamic generation method and device based on rich client platform

Publications (1)

Publication Number Publication Date
CN103309659A true CN103309659A (en) 2013-09-18

Family

ID=49134920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013101983354A Pending CN103309659A (en) 2013-05-24 2013-05-24 User interface dynamic generation method and device based on rich client platform

Country Status (1)

Country Link
CN (1) CN103309659A (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902722A (en) * 2014-04-10 2014-07-02 白杨 B/S (browser/server) based webpage display method and terminal
CN104007967A (en) * 2014-05-21 2014-08-27 广州华多网络科技有限公司 User interface generation method and device based on xml
CN104699468A (en) * 2013-12-05 2015-06-10 浙江大华系统工程有限公司 Client side and interface generation method thereof
CN105700925A (en) * 2016-01-13 2016-06-22 深圳市华讯方舟软件信息科技有限公司 APP interface implementation method and apparatus
CN105760148A (en) * 2014-12-17 2016-07-13 北京北方微电子基地设备工艺研究中心有限责任公司 Interface control attribute configuration method and device
CN106815271A (en) * 2015-12-02 2017-06-09 北京国双科技有限公司 Querying condition generation method and device
CN107015795A (en) * 2017-01-11 2017-08-04 阿里巴巴集团控股有限公司 A kind of method and device for drawing user interface
CN107102865A (en) * 2017-05-18 2017-08-29 福建星瑞格软件有限公司 A kind of method for being rapidly completed WEB demands
CN107678740A (en) * 2017-10-26 2018-02-09 福建星瑞格软件有限公司 A kind of method for packing and computer equipment of UI Service Component
CN107977277A (en) * 2017-12-21 2018-05-01 金蝶软件(中国)有限公司 The method, apparatus and computer equipment of third party system are integrated in ERP system
CN108051008A (en) * 2017-11-24 2018-05-18 惠州市德赛西威汽车电子股份有限公司 A kind of implementation method of vehicle mounted guidance interface I Driver functions
CN108733371A (en) * 2018-05-16 2018-11-02 北京奇艺世纪科技有限公司 A kind of interface creating method, device and equipment
CN109445890A (en) * 2018-10-09 2019-03-08 北京达佳互联信息技术有限公司 A kind of method for showing interface, device, terminal device and storage medium
CN109857811A (en) * 2019-02-15 2019-06-07 上海优扬新媒信息技术有限公司 A kind of block chain data managing method and device
CN110162354A (en) * 2018-02-13 2019-08-23 北京嘀嘀无限科技发展有限公司 Method, system and computer equipment for configuring and displaying components
CN112799669A (en) * 2021-04-06 2021-05-14 武汉元光科技有限公司 Method and device for generating application program interface layout code and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1584828A (en) * 2004-06-02 2005-02-23 中兴通讯股份有限公司 Automatic generatnig method for configuration interface of telecommunicating apparatus
CN1614557A (en) * 2003-11-04 2005-05-11 西门子公司 Method and system for dynamically generating user interfaces
CN101082865A (en) * 2007-06-29 2007-12-05 中兴通讯股份有限公司 Automatically generating method based on data driving interface
US8250458B2 (en) * 2005-06-30 2012-08-21 International Business Machines Corporation Method, system, and software tool for emulating a portal application

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614557A (en) * 2003-11-04 2005-05-11 西门子公司 Method and system for dynamically generating user interfaces
CN1584828A (en) * 2004-06-02 2005-02-23 中兴通讯股份有限公司 Automatic generatnig method for configuration interface of telecommunicating apparatus
US8250458B2 (en) * 2005-06-30 2012-08-21 International Business Machines Corporation Method, system, and software tool for emulating a portal application
CN101082865A (en) * 2007-06-29 2007-12-05 中兴通讯股份有限公司 Automatically generating method based on data driving interface

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104699468A (en) * 2013-12-05 2015-06-10 浙江大华系统工程有限公司 Client side and interface generation method thereof
CN104699468B (en) * 2013-12-05 2018-02-16 浙江大华系统工程有限公司 A kind of interface creating method of client and the client
CN103902722B (en) * 2014-04-10 2018-01-12 白杨 Webpage display methods and terminal based on B/S frameworks
CN103902722A (en) * 2014-04-10 2014-07-02 白杨 B/S (browser/server) based webpage display method and terminal
CN104007967A (en) * 2014-05-21 2014-08-27 广州华多网络科技有限公司 User interface generation method and device based on xml
CN105760148A (en) * 2014-12-17 2016-07-13 北京北方微电子基地设备工艺研究中心有限责任公司 Interface control attribute configuration method and device
CN106815271A (en) * 2015-12-02 2017-06-09 北京国双科技有限公司 Querying condition generation method and device
CN106815271B (en) * 2015-12-02 2020-11-06 北京国双科技有限公司 Query condition generation method and device
CN105700925B (en) * 2016-01-13 2019-02-19 深圳市华讯方舟软件信息有限公司 A kind of interface implementing method and device of APP
CN105700925A (en) * 2016-01-13 2016-06-22 深圳市华讯方舟软件信息科技有限公司 APP interface implementation method and apparatus
CN107015795A (en) * 2017-01-11 2017-08-04 阿里巴巴集团控股有限公司 A kind of method and device for drawing user interface
CN107102865A (en) * 2017-05-18 2017-08-29 福建星瑞格软件有限公司 A kind of method for being rapidly completed WEB demands
CN107678740A (en) * 2017-10-26 2018-02-09 福建星瑞格软件有限公司 A kind of method for packing and computer equipment of UI Service Component
CN108051008A (en) * 2017-11-24 2018-05-18 惠州市德赛西威汽车电子股份有限公司 A kind of implementation method of vehicle mounted guidance interface I Driver functions
CN107977277B (en) * 2017-12-21 2021-02-02 金蝶软件(中国)有限公司 Method and device for integrating third-party system in ERP system and computer equipment
CN107977277A (en) * 2017-12-21 2018-05-01 金蝶软件(中国)有限公司 The method, apparatus and computer equipment of third party system are integrated in ERP system
CN110162354A (en) * 2018-02-13 2019-08-23 北京嘀嘀无限科技发展有限公司 Method, system and computer equipment for configuring and displaying components
CN110162354B (en) * 2018-02-13 2022-05-13 北京嘀嘀无限科技发展有限公司 Method, system and computer equipment for configuring and displaying components
CN108733371A (en) * 2018-05-16 2018-11-02 北京奇艺世纪科技有限公司 A kind of interface creating method, device and equipment
CN109445890A (en) * 2018-10-09 2019-03-08 北京达佳互联信息技术有限公司 A kind of method for showing interface, device, terminal device and storage medium
CN109857811A (en) * 2019-02-15 2019-06-07 上海优扬新媒信息技术有限公司 A kind of block chain data managing method and device
CN112799669A (en) * 2021-04-06 2021-05-14 武汉元光科技有限公司 Method and device for generating application program interface layout code and electronic equipment
CN112799669B (en) * 2021-04-06 2021-07-06 武汉元光科技有限公司 Method and device for generating application program interface layout code and electronic equipment

Similar Documents

Publication Publication Date Title
CN103309659A (en) User interface dynamic generation method and device based on rich client platform
CN105893014A (en) Project development method and system for front end
CN112416339A (en) Page development method and device and computer equipment
WO2015078343A1 (en) Development method for web development system, and web development system
CN102360290A (en) Form building device and form building method
CN104133772A (en) Automatic test data generation method
CN102360296A (en) WEB-based online form development tool
CN102696012A (en) Creating inferred symbols from code usage
CN102654833A (en) Mobile phone application development method and system
CN103065000B (en) A kind of method of carrying out SysML state machine diagram analysis verification based on model-driven engineering
CN103049251A (en) Database persistent layer device and database operation method
da Silva et al. Model-driven gui generation and navigation for android bis apps
CN113064593B (en) Method and device for dynamic mobile APP, computer equipment and storage medium
CN103176785A (en) Widget application online implement system and method
CN104615431A (en) Method and device for achieving Web application
CN112463135A (en) Code generation method, code generator, electronic device, and storage medium
US20110126171A1 (en) Dynamic native editor code view facade
CN104133706B (en) Firmware modification method and firmware modification device
CN105302558A (en) Content presentation system and method for multiple clients
Colombo et al. A study for neutral format to exchange and reuse engineering knowledge in KBE applications
CN117215556A (en) Modularized page rapid construction method, system, equipment and medium
JP4889338B2 (en) Screen program layout changing method, information processing apparatus, program, and recording medium
CN101055521B (en) Mapping rule visualized generation method and system
CN115202652A (en) Platform building method, system, equipment and medium for service application form on cloud
Dukaczewski et al. MontiWeb-Modular Development of Web Information Systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130918

WD01 Invention patent application deemed withdrawn after publication