CN103902256B - Interface generating system and method - Google Patents

Interface generating system and method Download PDF

Info

Publication number
CN103902256B
CN103902256B CN201210568278.XA CN201210568278A CN103902256B CN 103902256 B CN103902256 B CN 103902256B CN 201210568278 A CN201210568278 A CN 201210568278A CN 103902256 B CN103902256 B CN 103902256B
Authority
CN
China
Prior art keywords
information
event
control
module
processing method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210568278.XA
Other languages
Chinese (zh)
Other versions
CN103902256A (en
Inventor
魏贺生
宋颖
李少维
洒西涛
潘俊
夏慧强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aisino Corp
Original Assignee
Aisino Corp
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 Aisino Corp filed Critical Aisino Corp
Priority to CN201210568278.XA priority Critical patent/CN103902256B/en
Publication of CN103902256A publication Critical patent/CN103902256A/en
Application granted granted Critical
Publication of CN103902256B publication Critical patent/CN103902256B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The invention relates to an interface generating system and method. The system comprises an interface triggering module, an analyzer, a control part describing module isolated from an external window, and an event linkage library module, wherein an external window of an interface is generated by the interface triggering module, and the analyzer is triggered; basic information, attribute information and event information of all control parts are stored in the control part describing module; the analyzer is triggered by the interface triggering module to be started; the basic information, the attribute information and the event information are acquired from the control part describing module; all the control parts are generated and loaded to the external window; the attribute and the corresponding relations between the events and the event processing methods of all the control parts are determined; the events are detected, the control parts relating to the events are determined, then the event processing methods corresponding to the events are determined, and the event processing methods are acquired from the event linkage library module and executed; the event processing methods are stored in the event linkage library module. With the method and system, the flexibility for processing new service can be improved, modifying workloads are reduced, and the modifying efficiency and the modifying quality are improved.

Description

Interface generation system and method
Technical Field
The present invention relates to the field of interface generation technologies, and in particular, to a system and a method for generating an interface.
Background
The interface is an intermediary between the client and the user. The interface comprises an external form and a plurality of controls distributed on the external form, each control has one or more events, and each event corresponds to one or more event processing methods. The indication of the user is reflected by the event of the control, and then the event processing method corresponding to the event is executed as the response to the indication of the user.
In the interface generated by the prior art, events and event processing methods of each control are bound with an external form and cannot be divided, and when new business requirements are met and the control, the event or the event processing method needs to be added or deleted, programs of the interface need to be comprehensively changed, and then retesting and applying are carried out. Therefore, the existing interface generation technology is not flexible when facing new services, the workload of modification is huge, and errors are easy to occur.
Disclosure of Invention
The technical problem to be solved by the invention is to provide an interface generation system and method, which can improve the flexibility when facing new services, reduce the workload of modification and improve the efficiency and quality of modification.
The technical scheme for solving the technical problems is as follows: a system for generating an interface, the system comprising: the system comprises an interface triggering module, a control description module, an analyzer and an event link library module; the control description module, the event link library module and an external form are isolated from each other; wherein,
the interface triggering module is used for generating an external form of the interface according to an external interface generation request and triggering the analyzer;
the control description module is used for storing the basic information, the attribute information and the event information of each control and sending the basic information, the attribute information and the event information to the analyzer; the basic information includes: name information, type information, hierarchy information; the attribute information includes: size information, font information, color information, and position information of the control on the external form; the event information includes: the corresponding relation between the storage address of each event processing method in the event link library module, the event and the corresponding event processing method;
the analyzer is used for being triggered by the interface triggering module to start; obtaining the basic information from the control description module, generating each control, enabling the name and the type of each control to respectively meet the requirements of the name information and the type information of the control, and loading each control onto the external window according to the hierarchical relationship determined by the hierarchical information; determining the attribute of each control according to the attribute information obtained from the control description module, wherein the attribute comprises: a size meeting the requirement of the size information, a font meeting the requirement of the font information, a color meeting the requirement of the color information, and a position meeting the requirement of the position information; obtaining the event information from the control description module, and determining the corresponding relation between the event of each control and the corresponding event processing method; detecting an occurred event, determining a control related to the event, further determining an event processing method corresponding to the event according to a corresponding relation between the event of the control and a corresponding event processing method, and acquiring and executing the event processing method from the event link library module according to a storage address of the event processing method in the event link library module;
the event link library module is used for storing the event processing method and sending the event processing method to the resolver.
The invention has the beneficial effects that: in the invention, the interface triggering module can generate an external window of the interface under the triggering of an interface generating request provided by the outside so as to trigger the operation of the resolver; the resolver is an operation core of the invention, can obtain the basic information, attribute information and event information of each control stored in the resolver from the control description module, generate and set each control on an external form on the basis of the basic information, and can also obtain a corresponding stored event processing method from the event link library module and execute the corresponding event processing method when detecting the occurrence of the event of the control as a response to the instruction of a user. In the interface generated by the invention, the basic information, attribute information and event information of the control are stored in the control description module, and the event processing method is stored in the event link library module and is isolated from the external window generated by the interface trigger module, so that when new service requirements are met and the addition and deletion of the control, the event and the event processing method are needed, only simple modification is needed to be carried out on the information in the control description module or the event link library module, the whole system does not need to be changed greatly, the modification workload is small, and the method is simple, reliable and not easy to make mistakes, thereby greatly improving the activity of the method in the aspect of new service, reducing the modification workload, and improving the modification efficiency and quality.
On the basis of the technical scheme, the invention can be further improved as follows:
further, the control is a data table control capable of generating a data table; then, in the attribute information of the data table control:
the size information includes: the number of rows and columns of the data table generated by the data table control, and the length and width of each column;
the font information is: the font of the text content to be filled in the data form generated by the data form control;
the color information is: a background color of a data form generated by the data form control;
the position information of the control on the interface is as follows: a position of a first column of a data table generated by the data table control.
Further, the attribute information further includes: initial value information;
the attributes of each of the controls determined by the parser further include: and the initial value meets the requirement of the initial value information.
Further, in the control description module, the attribute information of each control is stored in the form of an XML node.
Further, in the control description module, the event information of each control is stored in the form of an XML node, the event of the control corresponds to the attribute of the XML node, and the event processing method corresponding to the event corresponds to the attribute value of the XML node corresponding to the attribute.
In addition, the invention also provides an interface generation method, which is based on the system; the control description module, the event link library module and the external form are isolated from each other; the method comprises the following steps:
step 1: the interface triggering module generates an external window of the interface according to an external interface generation request and triggers the resolver; the resolver is triggered by the interface triggering module to start;
step 2: the resolver acquires basic information of each control from a control description module, generates each control, enables the name and the type of each control to respectively meet the requirements of name information and type information in the basic information, and loads each control onto the external form according to the hierarchical relationship determined by the hierarchical information in the basic information;
and step 3: the resolver determines the attribute of each control according to the attribute information obtained from the control description module, wherein the attribute comprises: a size that meets a requirement of size information in the attribute information, a font that meets a requirement of font information in the attribute information, a color that meets a requirement of color information in the attribute information, a position that meets a requirement of position information in the attribute information;
and 4, step 4: the analyzer obtains event information from the control description module and determines the corresponding relation between the event of each control and the corresponding event processing method;
and 5: the analyzer detects an occurred event, determines a control related to the event, and further determines an event processing method corresponding to the event according to a corresponding relation between the event of the control and the corresponding event processing method;
step 6: and the analyzer acquires the event processing method from the event link library module according to the storage address of the event processing method in the event information in the event link library module and executes the event processing method.
Drawings
Fig. 1 is a block diagram of an interface generation system according to the present invention;
fig. 2 is a flowchart of a method for generating an interface according to the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
Fig. 1 is a block diagram of an interface generation system according to the present invention. As shown in fig. 1, the system includes: the system comprises an interface triggering module 101, a control description module 103, a resolver 102 and an event link library module 104.
The interface triggering module 101 is configured to generate an external form of an interface according to an external interface generation request, and trigger the parser 102. Here, the interface generation request comes from the client.
The control description module 103 is configured to store and send basic information, attribute information, and event information of each control to the parser 102. The basic information here includes: the name information, the type information and the hierarchical information respectively set the name and the type of the corresponding control and the hierarchical relation with other controls. The attribute information here includes: and the size information, the font information, the color information and the position information of the control on the external form are respectively used for setting the size, the font and the color of the corresponding control and the position of the control on the external form. The event information here includes: the storage address of each event processing method in the event link library module 104, the corresponding relation between the event and the corresponding event processing method. In the event information, the correspondence between an event and a corresponding event processing method may be a one-to-one correspondence, or may not be a one-to-one correspondence, that is, one event corresponds to two or more event processing methods, or two or more events correspond to the same event processing method.
The parser 102 is an operation core of the system, and is initiated by being triggered by the interface triggering module 101. The parser 102 may obtain the basic information from the control description module 103, generate each control, make the name and type of each control respectively meet the requirements of the name information and type information thereof, and load each control onto the external form according to the hierarchical relationship determined by the hierarchical information. The parser 102 may further determine attributes of each control according to the attribute information obtained from the control description module 103, where the determined attributes include: a size that meets the requirements of the size information, a font that meets the requirements of the font information, a color that meets the requirements of the color information, a position that meets the requirements of the position information. The parser 102 may also obtain event information from the control description module 103, and determine a corresponding relationship between the event of each control and the corresponding event processing method. In this way, the parser 102 may detect an event that occurs, determine a control related to the event, further determine an event processing method corresponding to the event according to a corresponding relationship between the event of the control and the corresponding event processing method, and obtain and execute the event processing method from the event link library module 104 according to a storage address of the event processing method in the event link library module 104.
The event linker module 104 is used to store the event processing method and send it to the parser 102.
The control description module 103, the event link library module 104 and the external form are isolated from each other, so that the coupling degree of the three can be greatly reduced, and the flexibility of the interface generated by the method is improved when the interface faces a new service.
Therefore, in the invention, the interface triggering module can generate an external window of the interface under the triggering of the interface generating request provided by the external, so as to trigger the resolver to work; the resolver is an operation core of the invention, can obtain the basic information, attribute information and event information of each control stored in the resolver from the control description module, generate and set each control on an external form on the basis of the basic information, and can also obtain a corresponding stored event processing method from the event link library module and execute the corresponding event processing method when detecting the occurrence of the event of the control as a response to the instruction of a user. In the interface generated by the invention, the basic information, attribute information and event information of the control are stored in the control description module, and the event processing method is stored in the event link library module and is isolated from the external window generated by the interface trigger module, so that when new service requirements are met and the addition and deletion of the control, the event and the event processing method are needed, only simple modification is needed to be carried out on the information in the control description module or the event link library module, the whole system does not need to be changed greatly, the modification workload is small, and the method is simple, reliable and not easy to make mistakes, thereby greatly improving the activity of the method in the aspect of new service, reducing the modification workload, and improving the modification efficiency and quality.
The number of the controls on the interface can be only one or more than one. The types of controls are also diverse, and may be, for example, common text entry box controls, list box controls, radio box controls, check box controls, button controls, spreadsheet controls, container controls, and the like. The attribute information of the data table control is special. In the case that the control is a data table control capable of generating a data table, the attribute information of the data table control includes:
the size information includes: the row number, the column number, the length and the width of each column of the data table generated by the data table control;
the font information is: the font of the text content to be filled in the data form generated by the data form control;
the color information is: the background color of the data form generated by the data form control;
the position information of the control on the interface is as follows: the data table control generates a position of a first column of the data table.
In addition, in the present invention, the attribute information of the control may further include: initial value information for setting an initial value of the control. The properties of each control determined by parser 102 further include: initial values meeting the requirements of the initial value information.
The storage manner of the attribute information and the event information in the control description module 103 is various, for example, the attribute information of each control may be stored in the form of one XML node. For another example, the event information of each control is stored in the form of an XML node, so that the event of the control corresponds to the attribute of the XML node, and the event processing method corresponding to the event corresponds to the attribute value of the XML node corresponding to the attribute.
Based on the system, the invention further provides an interface generation method, and fig. 2 is a flow chart of the method. As shown in fig. 2, the method includes:
step 201: the interface triggering module generates a request according to an external interface, generates an external window of the interface and triggers the resolver; the resolver is started by the triggering of the interface triggering module.
Step 202: the resolver obtains the basic information of each control from the control description module, generates each control, enables the name and the type of each control to respectively meet the requirements of the name information and the type information in the basic information, and loads each control onto an external window according to the hierarchical relationship determined by the hierarchical information in the basic information.
Step 203: the analyzer determines the attribute of each control according to the attribute information obtained from the control description module, wherein the attribute comprises the following steps: a size that meets the requirements of the size information in the attribute information, a font that meets the requirements of the font information in the attribute information, a color that meets the requirements of the color information in the attribute information, and a position that meets the requirements of the position information in the attribute information.
Of course, the attribute information may further include initial value information, and in this step, the attribute of each control determined by the parser naturally includes an initial value that matches the initial value information in the attribute information.
Step 204: the analyzer obtains event information from the control description module and determines the corresponding relation between the event of each control and the corresponding event processing method.
According to the event information, the resolver can also obtain the storage address of the event processing method in the event link library module.
Step 205: the analyzer detects the event, determines the control related to the event, and further determines the event processing method corresponding to the event according to the corresponding relation between the event of the control and the corresponding event processing method.
Step 206: and the parser obtains the event processing method from the event link library module according to the storage address of the event processing method in the event information in the event link library module and executes the event processing method.
This step is the invocation and execution step of the event processing method.
It can be seen that the present invention has the following advantages:
(1) in the invention, the interface triggering module can generate an external window of the interface under the triggering of an interface generating request provided by the outside so as to trigger the operation of the resolver; the resolver is an operation core of the invention, can obtain the basic information, attribute information and event information of each control stored in the resolver from the control description module, generate and set each control on an external form on the basis of the basic information, and can also obtain a corresponding stored event processing method from the event link library module and execute the corresponding event processing method when detecting the occurrence of the event of the control as a response to the instruction of a user. In the interface generated by the invention, the basic information, attribute information and event information of the control are stored in the control description module, and the event processing method is stored in the event link library module and is isolated from the external window generated by the interface trigger module, so that when new service requirements are met and the addition and deletion of the control, the event and the event processing method are needed, only simple modification is needed to be carried out on the information in the control description module or the event link library module, the whole system does not need to be changed greatly, the modification workload is small, and the method is simple, reliable and not easy to make mistakes, thereby greatly improving the activity of the method in the aspect of new service, reducing the modification workload, and improving the modification efficiency and quality.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. A system for generating an interface, the system comprising: the system comprises an interface triggering module, a control description module, an analyzer and an event link library module; the control description module, the event link library module and an external form are isolated from each other; wherein,
the interface triggering module is used for generating an external form of the interface according to an external interface generation request and triggering the analyzer;
the control description module is used for storing the basic information, the attribute information and the event information of each control and sending the basic information, the attribute information and the event information to the analyzer; the basic information includes: name information, type information, hierarchy information; the attribute information includes: size information, font information, color information, and position information of the control on the external form; the event information includes: the corresponding relation between the storage address of each event processing method in the event link library module, the event and the corresponding event processing method;
the analyzer is used for being triggered by the interface triggering module to start; obtaining the basic information from the control description module, generating each control, enabling the name and the type of each control to respectively meet the requirements of the name information and the type information of the control, and loading each control onto the external window according to the hierarchical relationship determined by the hierarchical information; determining the attribute of each control according to the attribute information obtained from the control description module, wherein the attribute comprises: a size meeting the requirement of the size information, a font meeting the requirement of the font information, a color meeting the requirement of the color information, and a position meeting the requirement of the position information; obtaining the event information from the control description module, and determining the corresponding relation between the event of each control and the corresponding event processing method; detecting an occurred event, determining a control related to the event, further determining an event processing method corresponding to the event according to a corresponding relation between the event of the control and a corresponding event processing method, and acquiring and executing the event processing method from the event link library module according to a storage address of the event processing method in the event link library module;
the event link library module is used for storing the event processing method and sending the event processing method to the resolver.
2. The system of claim 1, wherein the control is a data table control that can generate a data table; then, in the attribute information of the data table control:
the size information includes: the number of rows and columns of the data table generated by the data table control, and the length and width of each column;
the font information is: the font of the text content to be filled in the data form generated by the data form control;
the color information is: a background color of a data form generated by the data form control;
the position information of the control on the interface is as follows: a position of a first column of a data table generated by the data table control.
3. The system of claim 1, wherein the attribute information further comprises: initial value information;
the attributes of each of the controls determined by the parser further include: and the initial value meets the requirement of the initial value information.
4. The system according to claim 1, wherein in the control description module, the attribute information of each control is stored in the form of an XML node.
5. The system according to claim 1, wherein in the control description module, the event information of each control is stored in the form of an XML node, the event of the control corresponds to the attribute of the XML node, and the event processing method corresponding to the event corresponds to the attribute value of the XML node corresponding to the attribute.
6. A method for generating an interface, the method being based on the system of claim 1; the system is characterized in that a control description module, an event link library module and an external window are isolated from each other; the method comprises the following steps:
step 1: the interface triggering module generates an external window of the interface according to an external interface generation request and triggers the resolver; the resolver is triggered by the interface triggering module to start;
step 2: the resolver acquires basic information of each control from a control description module, generates each control, enables the name and the type of each control to respectively meet the requirements of name information and type information in the basic information, and loads each control onto the external form according to the hierarchical relationship determined by the hierarchical information in the basic information;
and step 3: the resolver determines the attribute of each control according to the attribute information obtained from the control description module, wherein the attribute comprises: a size that meets a requirement of size information in the attribute information, a font that meets a requirement of font information in the attribute information, a color that meets a requirement of color information in the attribute information, a position that meets a requirement of position information in the attribute information;
and 4, step 4: the analyzer obtains event information from the control description module and determines the corresponding relation between the event of each control and the corresponding event processing method;
and 5: the analyzer detects an occurred event, determines a control related to the event, and further determines an event processing method corresponding to the event according to a corresponding relation between the event of the control and the corresponding event processing method;
step 6: and the analyzer acquires the event processing method from the event link library module according to the storage address of the event processing method in the event information in the event link library module and executes the event processing method.
CN201210568278.XA 2012-12-24 2012-12-24 Interface generating system and method Active CN103902256B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210568278.XA CN103902256B (en) 2012-12-24 2012-12-24 Interface generating system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210568278.XA CN103902256B (en) 2012-12-24 2012-12-24 Interface generating system and method

Publications (2)

Publication Number Publication Date
CN103902256A CN103902256A (en) 2014-07-02
CN103902256B true CN103902256B (en) 2017-05-10

Family

ID=50993602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210568278.XA Active CN103902256B (en) 2012-12-24 2012-12-24 Interface generating system and method

Country Status (1)

Country Link
CN (1) CN103902256B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104267962A (en) * 2014-10-09 2015-01-07 浪潮通用软件有限公司 Description-based interface UI control configuration method
CN105988814B (en) * 2015-03-02 2020-07-03 腾讯科技(深圳)有限公司 Interface generation method and device
CN106201030B (en) * 2016-07-07 2019-02-01 徐文波 A kind of multimedia controlled plate can customize control
CN108427557A (en) * 2017-05-10 2018-08-21 平安科技(深圳)有限公司 A kind of control layout display control method, device and computer readable storage medium
CN107132975A (en) * 2017-05-26 2017-09-05 努比亚技术有限公司 A kind of control editing and processing method, mobile terminal and computer-readable recording medium
CN107678740A (en) * 2017-10-26 2018-02-09 福建星瑞格软件有限公司 A kind of method for packing and computer equipment of UI Service Component
CN109960492A (en) * 2018-10-15 2019-07-02 扬州万方电子技术有限责任公司 A kind of detection system and its application method based on QT platform
CN111078348B (en) * 2019-12-25 2023-06-23 广州市百果园信息技术有限公司 Interface management method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246424A (en) * 2008-02-22 2008-08-20 深圳国人通信有限公司 Menu automatic generation system and method for based on file
CN101477461A (en) * 2009-02-10 2009-07-08 腾讯科技(深圳)有限公司 Dynamic generation apparatus and method for application program interface
CN101944027A (en) * 2010-09-26 2011-01-12 北京神州泰岳软件股份有限公司 User interface generation method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246424A (en) * 2008-02-22 2008-08-20 深圳国人通信有限公司 Menu automatic generation system and method for based on file
CN101477461A (en) * 2009-02-10 2009-07-08 腾讯科技(深圳)有限公司 Dynamic generation apparatus and method for application program interface
CN101944027A (en) * 2010-09-26 2011-01-12 北京神州泰岳软件股份有限公司 User interface generation method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《Web用户界面动态生成工具的设计与实现》;侯彦娥,党兰学,魏丹;《河南大学学报》;20111116;第41卷(第6期);第641-644页 *

Also Published As

Publication number Publication date
CN103902256A (en) 2014-07-02

Similar Documents

Publication Publication Date Title
CN103902256B (en) Interface generating system and method
US9021440B1 (en) System and method for automated test script generation
CN101976220B (en) Unit test system
CN101930400A (en) SDK (Software Development Kit) automatic test system and method
US9037913B2 (en) Dynamic event generation for user interface control
JP2014507029A (en) Formatting data by example
CN105930138B (en) A kind of message treatment method and device
US20140101092A1 (en) Adjustment of map reduce execution
US9547724B2 (en) Providing rule based analysis of content to manage activation of web extension
US20120198476A1 (en) Evaluating performance of an application using event-driven transactions
US8046638B2 (en) Testing of distributed systems
CN104639347A (en) Multi-cluster monitoring method and device, and system
CN107943466B (en) Database access statement generation method, device and equipment
CN107562459B (en) Management system, interface generating/displaying/operating method, medium, and terminal
CN111026670B (en) Test case generation method, test case generation device and storage medium
US8561032B2 (en) Visualizing thread life time in eclipse
CN103810084B (en) A kind of method of testing, the device and system of JS codes
CN107908679B (en) Script statement conversion method and device and computer readable storage medium
CN115904669A (en) Task scheduling method, system, electronic device and computer readable storage medium
KR101689984B1 (en) Programmable controller, programmable controller system, and execute error information creation method
US9280361B2 (en) Methods and systems for a real time transformation of declarative model and layout into interactive, digital, multi device forms
US20150261646A1 (en) Selective profiling of applications
US11341022B2 (en) Runtime performance introspection
CN112115118B (en) Database pressure measurement optimization method and device, storage medium and electronic equipment
US8892519B2 (en) Command interpreter

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant