WO2010091623A1 - 应用程序界面动态生成装置及方法 - Google Patents

应用程序界面动态生成装置及方法 Download PDF

Info

Publication number
WO2010091623A1
WO2010091623A1 PCT/CN2010/070499 CN2010070499W WO2010091623A1 WO 2010091623 A1 WO2010091623 A1 WO 2010091623A1 CN 2010070499 W CN2010070499 W CN 2010070499W WO 2010091623 A1 WO2010091623 A1 WO 2010091623A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
description
information
application
interface element
Prior art date
Application number
PCT/CN2010/070499
Other languages
English (en)
French (fr)
Inventor
黄磊
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2010091623A1 publication Critical patent/WO2010091623A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Definitions

  • the present invention relates to the field of interface technologies, and in particular, to an application interface dynamic generation apparatus and method. Background of the invention
  • GTK GIMP Toolkit
  • GTK provides a rich interface function to construct application interface elements, and application developers can be in the logic code of the application.
  • the GTK primitive is used to create and lay out the required interface elements to construct a graphical application interface for birth.
  • interface code can be generated more easily, saving interface development time.
  • FIG. 1 is a flow chart of generating an application interface by using an existing interface generation tool. As shown in FIG. 1 , the process includes the following steps:
  • Step 101 The interface generation tool generates an interface description.
  • the interface generation tool generates an interface description according to the user's selection and setting of the interface element, and the interface description is an intermediate file, which includes various interface related information such as attributes and layout of the interface element, according to the corresponding relationship between the preset interface element and the interface description. Used to describe various features of the interface.
  • the generated interface description may be an interface description file in an XML format, and the user may obtain a desired interface description by modifying a portion of the interface description that does not meet the requirements.
  • Step 102 The interface generation tool generates a C language code file of the interface part according to the interface description.
  • the interface generation tool generates a C language code file corresponding to the specific interface part of the interface description according to the interface description and the C language code correspondence of the specific GTK interface element, and at the same time, the user can modify the non-compliant part of the C language code file, for example, adding Callback function, etc., and finally get the required interface C language code.
  • the existing interface generation tool can only generate files containing interface C language code, and the C language code of the interface part needs to be compiled together with the application logic code to generate the final application execution file.
  • the logic code of the application it is necessary to call and parse the interface description of the XML format, and call the GTK library to construct the interface through the C language code of the interface part.
  • the interface generation tool can make the generation of the interface code large, and most of the code is automatically generated by the interface generation tool according to the interface element code template, and finally only needs to be generated. A small amount of modification to the generated standard code can generate an interface code that meets the requirements.
  • the interface generation tool can compile the interface code, and through the interface description as a bridge between the logic code and the interface code, the interface code and the logic code are partially separated to some extent, and the interface code and the logic code are reduced.
  • the degree of mutual influence that is, the degree of coupling, but since the C language code of the interface part generated by the interface generation tool needs to be compiled and linked with the logic code of the application, in fact, the code of the interface part is still included in the code of the final application. , there is still a certain degree of coupling.
  • Logic code compiles the connection, the flexibility and extensibility of the interface design are greatly limited, and it is inconvenient for the post-maintenance and update of the application interface. Summary of the invention
  • the embodiment of the invention provides a device interface dynamic generation device, which can greatly reduce the coupling degree between the logic code of the application program and the interface code, and make the application interface design more flexible.
  • the embodiment of the invention provides a method for dynamically generating a graphical user interface, which can greatly reduce the coupling degree between the logic code of the application program and the interface code, and make the application interface design more flexible.
  • An application interface dynamic generation device the device includes:
  • An external interface connected to the interface description interpreter, receiving the interface description file and outputting to the interface description interpreter;
  • An interface description interpreter is connected to the external interface, receives an interface description file from the external interface, defines an analysis interface description file according to a description of a preset interface element, and obtains related information of the interface element;
  • An interface generator is connected to the interface description interpreter, and invokes a pre-packaged interface element code to create and set an interface element according to the related information of the interface element; and layouts the interface element to generate an application interface.
  • a method for dynamically generating an application interface comprising:
  • the pre-packaged interface element code is used to create and set the interface element according to the related information of the interface element, and the interface element is laid out to generate an application interface.
  • the application interface dynamic generation device and method of the present invention generate an application interface through a predefined interface description, and the application logic
  • the code part does not need to participate in the specific interface generation, only need to provide the interface description file
  • the application interface dynamic generation device creates and layouts the interface elements through the pre-encapsulated interface element code, dynamically generates the required interface part, the logic of the application
  • the code part does not need to include specific interface generation code, so that the coupling degree between the logic code part and the interface code part is greatly reduced, the application interface design is more flexible, and the post-maintenance cost and interface development difficulty are reduced.
  • FIG. 1 is a flow chart of generating an application interface by using an existing interface generation tool
  • FIG. 2 is a schematic diagram of an application environment of an application interface dynamic generation device according to the present invention
  • FIG. 3 is a structure of a second embodiment of an application interface dynamic generation device according to the present invention.
  • FIG. 4 is a schematic structural diagram of a third embodiment of an application interface dynamic generation apparatus according to the present invention.
  • FIG. 5 is a schematic structural diagram of a first embodiment of an interface description interpreter according to the present invention.
  • FIG. 6 is a schematic structural diagram of a second embodiment of an interface description interpreter according to the present invention.
  • FIG. 7 is a schematic structural diagram of an embodiment of an element manager of the present invention.
  • FIG. 8 is a flowchart of a method for dynamically generating an application interface according to the present invention
  • FIG. 9 is a specific flowchart of a first embodiment of a dynamic interface generation method according to the present invention. flow chart.
  • FIG. 11 is a schematic structural diagram of a first embodiment of an application interface dynamic generation apparatus according to the present invention.
  • the invention mainly realizes the dynamic generation of the application interface through the dynamic interface generating device, so that the application program does not need to include the interface code, and only needs to provide the interface description, the device pre-packages the generated code of the interface element, and analyzes the interface description and according to the interface. Describe the dynamic creation and layout interface elements, and generate the application interface.
  • the code completely separates the interface code and the logic code, greatly reduces the coupling between the logic code and the interface code, makes the application interface development more flexible, and has strong scalability, and the workload of post-maintenance and modification is greatly reduced. You only need to modify the interface description file to modify the interface, no need to consider the problem of compiling with the logic code.
  • FIG. 2 is a schematic diagram of an application environment of an application interface dynamic generation apparatus according to an embodiment of the present invention.
  • the application program 201 and the interface element library 202 are included in the operating system.
  • the application interface dynamic generation device 204 of the embodiment of the present invention pre-packages the interface elements based on the interface element library 202 based on the interface element library 202.
  • the code, and pre-defining the interface description corresponding to the interface element, dynamically generating the interface according to the interface description file, and the application 201 can communicate with the interface dynamic generation device 204 through the interface interface 203, for example, sending the interface description file to the application interface dynamic generation device 204.
  • the application interface dynamic generation device 204 obtains information about the interface element by parsing the interface description file, for example, what interface element is included in the interface, attribute information of the interface element, and layout information, etc., and the interface is created by pre-packaged graphic library-based interface element code. Elements are set up and laid out to get the application interface you need.
  • the application program 201 only needs to send the interface description to the application interface dynamic generation device of the present invention, so that the application does not need to contain a specific interface code.
  • the interface dynamic generation device of the invention can be applied to operations such as windows windows or linux.
  • the interface description file can be implemented in XML format or other language format;
  • the interface element library can be a graphic material library such as GTK or GTK+.
  • the following describes an embodiment of the application interface dynamic generation apparatus of the present invention by taking an interface description file in an XML format and a GTK graphics library as an example.
  • FIG. 11 is a schematic structural diagram of a first embodiment of an application interface dynamic generation apparatus according to the present invention; as shown in FIG. 11, the apparatus includes: an external interface 1101, an interface description interpreter 1102, and an interface generator 1103.
  • the external interface 1101 is connected to the interface description interpreter 1102, and receives the interface description file and outputs it to the interface description interpreter 1102.
  • the external interface 1101 is for providing an interactive interface with the logic code portion of the application, for example, providing a specific interface function for initializing the interface dynamic generation device, creating an interface from the interface description file, and acquiring an element from the interface according to the element name.
  • the interface functions provided should be minimized, thereby reducing the learning cost of the interface developer, and can also greatly reduce the amount of code used in the application to interact with the interface.
  • an initialization interface for receiving an instruction to initialize an application interface dynamic generation device
  • an interface description interface for receiving an interface description file
  • an element acquisition interface for receiving an interface element in an application interface generated by the instruction output.
  • the specific interfaces can be many depending on the functions that need to be implemented. I won't go into details here.
  • the interface description interpreter 1102 is connected to the external interface 1101, receives an interface description file from the external interface, defines an analysis interface description file according to a description of a preset interface element, and obtains related information of the interface element.
  • the interface description interpreter 1102 can receive an interface description file in an XML format and define an interface description file in an XML format according to a description of a preset interface element, and obtain related information of the interface element.
  • the information about the interface elements is used to create interface elements and layout the interface elements to generate some information, such as attribute information and layout information;
  • the information includes types of interface elements, such as buttons, radio buttons, text boxes, and the like, and specific attribute information under the type, and interface element attributes are related to a specific graphic library, which is used in this embodiment.
  • the layout information includes: such as the position and size of the interface elements, and the accommodation relationship between the interface elements.
  • how to define the XML description of the interface element can be determined according to specific needs, and the information content specifically included in the related information can also be determined according to needs.
  • the interface generator 1103 is connected to the interface description interpreter 1102, and invokes a pre-packaged interface element code to create and set an interface element according to the related information of the interface element; and layouts the interface element to generate an application interface.
  • the interface generator may include different specific implementation modules according to the specific information included in the related information. Taking the attribute information and the layout information as an example, the interface generator may specifically include an element manager and a layout manager.
  • FIG. 3 is a schematic structural diagram of a second embodiment of an application interface dynamic generation apparatus according to the present invention; as shown in FIG. 3, the apparatus includes: an external interface 301, an interface description interpreter 302, an element manager 303, and a layout manager 304;
  • the external interface 301 and the interface description interpreter 302 have the same functions as those in the first embodiment, and the element manager 303 and the layout manager 304 are specific implementations of the interface generator 1103 in the first embodiment.
  • the external interface 301 is connected to the interface description interpreter 302, and receives the interface description file and outputs the interface description interpreter 302;
  • the interface description interpreter 302 is connected to the external interface 301, and is connected to the interface description interpreter 302 from the external interface 301 element manager 303.
  • the pre-packaged interface element code is called according to the attribute information received from the interface description interpreter 302, and is created.
  • the Element Manager is used to dynamically maintain interface elements, including creating elements, setting element attributes, destroying elements, etc. These specific maintenance functions are defined in the GTK primitives. This is no longer the case - and the logical behavior of the elements, such as the click event processing of the button, can be left to the application to monitor and process itself, for example, in the external interface 301 to provide monitoring and processing of the logical behavior of the element.
  • the interface function in order to maintain the flexibility of application development, of course, can also be achieved by the element manager, the specific implementation method here is not - described.
  • the layout manager 304 is connected to the interface description interpreter 302 and the element manager 303, and layouts the interface elements created by the element manager 303 according to the layout information received from the interface description interpreter to obtain a required application interface.
  • GTK uses the container mechanism to reasonably separate the responsibilities of the control. Almost all interface elements are containers, which can accommodate any other interface elements.
  • the layout mechanism dynamically calculates the coordinate position of each sub-window and adapts the screen size. Therefore, the layout manager can completely use the GTK layout method to layout the interface elements.
  • the layout method can also be determined according to specific needs.
  • the pre-encapsulated interface element code is generated based on the syntax of the GTK graphics library, which is equivalent to the code template of the interface element.
  • these preset templates can be applied to generate specific interface elements.
  • FIG. 4 is a schematic structural diagram of a third embodiment of an application interface dynamic generation apparatus according to the present invention; as shown in FIG. 4, the apparatus includes, on the basis of the second embodiment, an external interface 401, an interface description interpreter 402, and element management.
  • a function expansion module 405 is further included, and is connected to the interface description interpreter 402 for recording attribute and layout information of all interface elements parsed by the interface description interpreter 402. By recording this information, the application can modify the properties of the interface elements such as the style or color, and implement the theme skin change or color change of the interface. Other functions can be added as needed, so I won't go into details here.
  • the function expansion module 405 the application interface dynamic generation device of the present invention can provide richer interface functions.
  • FIG. 5 is a schematic structural diagram of a first embodiment of an interface description interpreter according to the present invention. As shown in FIG. 5, the interface description interpreter includes:
  • the element definition module 501 is configured to save a description definition of the interface element.
  • the attribute information parsing module 502 is connected to the element definition module 501, and is configured to parse the attribute information of the interface element from the interface description file according to the description definition saved in the element definition module 501.
  • the layout information parsing module 503 is connected to the element definition module 501, and is configured to parse out the layout information of the interface element from the interface description file according to the description definition saved in the element definition module 501.
  • the interface description interpreter includes an element definition module 601 and an attribute information parsing module 602 having the same functions as those in FIG.
  • the layout information parsing module 603 further includes: a template class information parsing module 604, connected to the element definition module 601, configured to parse out the template of the interface element from the interface description file according to the description definition saved in the element definition module 601. Class information
  • the attribute information parsing module 602 is further connected to the template class information parsing module 604 based on the first embodiment shown in FIG. 5, and parses the attribute information of the interface element according to the template class information;
  • the layout information parsing module 603 is further connected to the template class information parsing module 604 based on the first embodiment shown in FIG. 5, and parses the layout information of the interface elements according to the template class information.
  • FIG. 7 is a schematic structural diagram of an embodiment of an element manager according to the present invention. As shown in FIG. 7, the element manager includes:
  • the element creation module 701 is configured to invoke a pre-saved interface element generation code according to the attribute information of the interface element to create an interface element;
  • the element setting module 702 is connected to the element creating module 701, and configured to set the interface element created by the element creating module 701 according to the attribute information of the interface element.
  • the definition of the interface elements in the interface description can be set according to the needs, and the specific definition can be implemented through the configuration file.
  • the definition rules of the interface elements can be modified, thereby more flexibly
  • the description of the interface elements is modified.
  • This description shows a new window, where window name represents the window name, position represents the position, size represents the size, title represents the window title, and these statements and formats are pre-defined, and the interface description information is parsed according to these definitions.
  • m_gtkWindow gtk_window_new()
  • Gtk_window_set_title (GTK_WINDOW(m_gtkWindow),"Sign On”);
  • gtk_widget_set_size_request (m_gtkWindow,510,430);
  • Gtk_window_set_position (GTK_WINDOW(m_gtkWindow),0,0); Another example:
  • button align indicates that the button is a valley.
  • m_gtkButton gtk_button_new()
  • Gtk_widget_set_size_request (m_gtkButton ,90,48);
  • Gtk_container_add (GTK_CONTAINER(m_gtkWindow ),m_gtkButt on )
  • the elements provided by the GTK graphics library are powerful, have many attributes, and have many interface methods.
  • the interface description of the XML format it is cumbersome to describe the attributes of these elements; and in general, the application Among the required interfaces, there are many elements with the same or similar characteristics, their attributes have certain commonalities, and there will be more repeated descriptions. As follows:
  • the two interface elements are almost the same, only the "pad" attribute is different.
  • some common or large-featured elements or partial interface descriptions are defined in advance as XML element templates.
  • these element template class description elements are directly used. Attributes that are personalized or have some differences from template elements in individual places can be re-described by the application interface description, for example:
  • FIG. 8 is a flowchart of an embodiment of a method for dynamically generating an application interface according to the present invention. As shown in FIG. 8, the method includes the following steps:
  • Step 801 Receive an interface description file.
  • Step 802 Decompose the interface description file according to the description of the preset interface element.
  • the interface element described in the interface description file may be obtained in sequence to determine whether the interface element is legal and can be supported. If yes, the description content of the interface element is obtained, and the description is defined according to the description of the preset interface element.
  • the description content of the interface element is parsed, the interface element is created and laid out; otherwise, the description content of the next interface element is obtained from the interface description file, until all the interface elements in the interface description are completed, that is, the interface description is constructed.
  • the application interface corresponding to the file may be obtained in sequence to determine whether the interface element is legal and can be supported. If yes, the description content of the interface element is obtained, and the description is defined according to the description of the preset interface element.
  • the description content of the interface element is parsed, the interface element is created and laid out; otherwise, the description content of the next interface element is obtained from the interface description file, until all the interface elements in the interface description are completed, that is, the
  • the interface element may be further determined whether the interface element contains template class information, and if yes, acquiring template class information of the interface element, and according to preset template class information and interface element. The corresponding relationship between the description contents, and the description content of the interface element is obtained.
  • Step 803 Call a pre-packaged interface element code according to the information about the interface element to create and set an interface element, and lay out the interface element to generate an application interface.
  • the interface element may be created and set according to the attribute information by calling the pre-packaged interface element code, and the interface element is laid out according to the layout information to generate an application interface.
  • FIG. 9 is a specific flowchart of a first embodiment of a method for generating a dynamic interface according to the present invention. As shown in FIG. 9, the process includes the following steps:
  • Step 901 Load an XML interface description file.
  • the XML interface description file is received through the external interface, and parsed according to the predefined description, and the attribute information and layout information of the interface element are parsed. If the template class attribute of the interface element is also defined in advance, the template class information of the interface element is also parsed.
  • step 902 the next interface element is obtained. If yes, step 903 is performed, otherwise the process ends.
  • step 903 it is determined whether the interface element is legal and can be supported. If yes, step 904 is performed. Otherwise, return to step 902.
  • This step needs to determine whether the interface element meets the previous definition or can support the processing of the element. If the interface element conforms to the previous definition and can be supported, proceed to the next step. Otherwise, the interface element is considered illegal or cannot be supported. Can not process or return an error prompt; determine whether the interface element is legal and supportable, can be judged according to the preset interface description grammar, the description content meets the grammar requirements and requirements, can be considered legal, grammatical and the description content is also pre- If it is defined, it can be judged as supportable.
  • the specific judgment method belongs to the existing mature technology, and will not be described here.
  • Step 904 loading an element attribute.
  • Step 905 create a GTK element.
  • the pre-packaged interface element code is called, and the corresponding GTK element is created based on the primitive of the GTK graphics library.
  • Step 906 setting the GTK element attribute and performing layout, and returning to step 902.
  • the created GTK elements are set according to the attribute information, and are arranged according to the layout information.
  • the interface is constructed, and the developer can obtain the GTK element object according to the element name, focusing on the logic development of the program, without having to care about the complicated Interface adjustments and layout.
  • the attributes and layout information of all interface elements in the generated application interface may be further recorded.
  • the interface functions are uniformly modified by the application program to implement extended functions such as interface theme, skin, and color replacement.
  • FIG. 10 is a specific flowchart of a second embodiment of a method for generating a dynamic interface according to the present invention. As shown in FIG. 10, the process includes the following steps: Steps 1001 to 1002 are the same as steps 901 to 902.
  • Step 1003 determining whether the interface element is legal and supportable, and if yes, performing the step
  • Step 1004 determining whether the interface element includes a template class attribute, and if yes, performing the step
  • step 1006 is performed.
  • Step 1005 loading the template class attribute.
  • Step 1006 loading the element attribute.
  • the loading interface element itself is distinguished from the private property of the public property of the template class, that is, the difference information of the template class information that is different from the interface element.
  • Steps 1007 ⁇ 1008 are the same as steps 905 ⁇ 906, and are not described here.
  • the application interface dynamic generation device and method of the present invention generate an application interface through a predefined interface description, and the logic code portion of the application does not need to participate in a specific interface generation, and only needs to provide an interface description file.
  • the application interface dynamic generation device creates and layouts the interface elements through the pre-packaged interface element code, and dynamically generates the required interface portion, and the logic code portion of the application does not need to include the specific interface generation code, so that the logic code portion and the interface code Part of the coupling degree is greatly reduced, making the application interface design more flexible, reducing post-maintenance costs and interface development difficulty.
  • the complexity and development difficulty of the interface description can be further reduced.

Description

应用程序界面动态生成装置及方法
技术领域
本发明涉及界面技术领域, 特别涉及应用程序界面动态生成装置及 方法。 发明背景
目前,绝大多数应用程序都采用了图形用户界面作为应用程序界面, 随着应用程序功能的丰富, 程序界面的设计也越来越复杂, 为方便应用 程序界面的设计与开发, 出现了很多用于应用程序界面生成的通用图形 库, 例如 GTK(GIMP Toolkit)就是其中应用最为广泛的一个, GTK提供 了丰富的接口函数来构造应用程序界面元素, 应用程序开发者可以在应 用程序的逻辑代码中, 通过 GTK原语创建和布局所需的界面元素, 从 而构造出生动的图形化应用程序界面。 另外, 使用基于 GTK的界面生 成工具, 可以更加方便地生成界面代码, 从而节约界面的开发时间。
图 1为通过现有界面生成工具生成应用程序界面的流程图, 如图 1 所示, 该流程包括如下步骤:
步骤 101 , 界面生成工具生成界面描述。
界面生成工具根据用户对界面元素的选择和设置, 通过预设的界面 元素与界面描述的对应关系生成界面描述, 界面描述是一个中间文件, 包含界面元素的属性、 布局等各种界面相关信息, 用于描述界面的各种 特征。 生成的界面描述可以是采用 XML格式的界面描述文件, 用户可 以通过修改界面描述中不符合要求的部分, 从而得到所需的界面描述。
步骤 102, 界面生成工具根据界面描述生成界面部分的 C语言代码 文件。 界面生成工具根据界面描述和具体 GTK界面元素的 C语言代码对 应关系, 生成符合界面描述的具体界面部分的 C语言代码文件, 同时, 用户可以修改 C语言代码文件中不符合要求的部分, 例如添加回调函数 等, 最终得到所需的界面 C语言代码。
现有界面生成工具只能生成包含界面 C语言代码的文件, 而界面部 分的 C语言代码还需要与应用程序的逻辑代码一起编译,生成最终的应 用程序执行文件。 同时, 在应用程序的逻辑代码中, 需要调用并解析 XML格式的界面描述,并通过界面部分的 C语言代码调用 GTK库构造 生成界面。
相对于直接使用 GTK原语 API生成界面部分 C语言代码的方法, 采用界面生成工具可以使得界面代码的生成大为筒化, 大部分代码由界 面生成工具根据界面元素代码模版自动生成, 最后只需要对生成的标准 代码进行少量修改, 就可以生成符合要求的界面代码。
虽然界面生成工具可以筒化界面代码的编写, 同时通过界面描述作 为逻辑代码与界面代码之间的桥梁, 也在一定程度上做到了界面代码与 逻辑代码的部分分离, 减少了界面代码和逻辑代码之间互相影响的程 度, 即耦合度, 但由于界面生成工具生成的界面部分的 C语言代码需要 和应用程序的逻辑代码一起编译连接, 实际上最终应用程序的代码中仍 然要包含界面部分的代码, 仍然有一定的耦合度, 在这种情况下, 当界 面有调整, 即使是界面元素属性等细小的调整, 也需要修改应用程序, 重复上述界面生成的多个步骤, 最后重新与应用程序的逻辑代码编译连 接, 界面设计的灵活性和可扩展性会受到较大限制, 对于应用程序界面 的后期维护和更新都很不方便。 发明内容
本发明实施例提供一种应用程序界面动态生成装置, 可使应用程序 的逻辑代码与界面代码耦合度大幅降低, 使应用程序界面设计更加灵 活。
本发明实施例提供一种图形用户界面动态生成方法, 可使应用程序 的逻辑代码与界面代码耦合度大幅降低, 使应用程序界面设计更加灵 活。
为达到上述目的, 本发明的技术方案具体是这样实现的: 一种应用程序界面动态生成装置, 该装置包括:
外部接口, 与界面描述解释器相连, 接收界面描述文件并输出至界 面描述解释器;
界面描述解释器, 与所述外部接口相连, 从所述外部接口接收界面 描述文件, 根据预设的界面元素的描述定义解析界面描述文件, 得到界 面元素的的相关信息;
界面生成器, 与所述界面描述解释器相连, 根据所述界面元素的相 关信息调用预先封装的界面元素代码创建并设置界面元素; 对界面元素 进行布局, 生成应用程序界面。
一种应用程序界面动态生成方法, 该方法包括:
接收界面描述文件;
根据预设的界面元素的描述定义对界面描述文件进行解析, 得到界 面元素的相关信息;
根据所述界面元素的相关信息调用预先封装的界面元素代码创建 并设置界面元素, 对界面元素进行布局, 生成应用程序界面。
由上述的技术方案可见, 本发明的这种应用程序界面动态生成装置 和方法, 通过预先定义的界面描述来生成应用程序界面, 应用程序的逻 辑代码部分无须参与具体的界面生成, 只需要提供界面描述文件, 由应 用程序界面动态生成装置通过预先封装的界面元素代码, 创建并布局界 面元素, 动态生成所需要的界面部分, 应用程序的逻辑代码部分无须包 含具体界面生成代码, 使得逻辑代码部分与界面代码部分的耦合度大幅 度降低, 使应用程序界面设计更加灵活, 减少后期维护成本和界面开发 难度。 附图简要说明
图 1为通过现有界面生成工具生成应用程序界面的流程图; 图 2为本发明应用程序界面动态生成装置的应用环境示意图; 图 3 为本发明应用程序界面动态生成装置第二实施例的结构示意 图;
图 4 为本发明应用程序界面动态生成装置第三实施例的结构示意 图;
图 5为本发明界面描述解释器第一实施例的结构示意图;
图 6为本发明界面描述解释器第二实施例的结构示意图;
图 7为本发明元素管理器实施例的结构示意图;
图 8为本发明应用程序界面动态生成方法实施例的流程图; 图 9为本发明动态界面生成方法第一实施例的具体流程图; 图 10为本发明动态界面生成方法第二实施例的具体流程图。
图 11 为本发明应用程序界面动态生成装置第一实施例的结构示意 图; 实施本发明的方式
为使本发明的目的、技术方案和优点更加清楚明白,以下举实施例, 并参照附图, 对本发明进一步详细说明。
本发明主要是通过动态界面生成装置实现了应用程序界面的动态 生成, 使应用程序中无须包含界面代码, 只需提供界面描述, 该装置预 先封装界面元素的生成代码, 通过解析界面描述并根据界面描述动态创 建和布局界面元素, 生成应用程序界面; 应用程序中只需调用动态界面 生成装置的外部接口, 即可得到所需的界面, 不需要显式地编写界面部 分的创建、 设置和布局等代码, 使界面代码和逻辑代码彻底分离, 极大 减少了逻辑代码和界面代码之间的耦合度, 使应用程序界面开发更加灵 活, 可扩展性强, 后期维护和修改的工作量大为减少, 只需修改界面描 述文件即可实现界面的修改, 无须考虑与逻辑代码连接编译的问题。
图 2为本发明实施例的应用程序界面动态生成装置的应用环境示意 图。 如图 2所示, 在操作系统中包括应用程序 201和界面元素库 202, 其中, 本发明实施例的应用程序界面动态生成装置 204基于界面元素库 202, 预先封装基于界面元素库 202 的界面元素代码, 并预先定义与界 面元素对应的界面描述,根据界面描述文件动态生成界面,应用程序 201 可以通过界面接口 203与界面动态生成装置 204通信, 例如向应用程序 界面动态生成装置 204发送界面描述文件, 应用程序界面动态生成装置 204通过解析界面描述文件得到界面元素相关信息, 例如界面中包含什 么界面元素、 界面元素的属性信息和布局信息等, 通过预先封装的基于 图形库的界面元素代码创建界面元素并进行设置和布局, 得到需要的应 用程序界面。 应用本发明的应用程序界面动态生成装置 204时, 应用程 序 201 只需要将界面描述发送给本发明的应用程序界面动态生成装置 完成, 因此应用程序中无需含有具体界面代码。
本发明的界面动态生成装置可以适用于视窗 windows或 linux等操 作系统, 界面描述文件可以采用 XML格式或者其它语言格式实现; 界 面元素库可以是 GTK或 GTK+等图形素材库。 下面以采用 XML格式的 界面描述文件, 和 GTK 图形库为例, 对本发明的应用程序界面动态生 成装置的具体实施方式加以说明。
图 11 为本发明应用程序界面动态生成装置第一实施例的结构示意 图; 如图 11所示, 该装置包括: 外部接口 1101、 界面描述解释器 1102 和界面生成器 1103。
外部接口 1101 , 与界面描述解释器 1102相连, 接收界面描述文件 并输出至界面描述解释器 1102。
外部接口 1101是用于提供与应用程序的逻辑代码部分的交互接口, 例如提供对界面动态生成装置进行初始化、 从界面描述文件创建界面、 根据元素名称从界面中获取某个元素等具体接口功能。 提供的接口功能 应尽量少, 从而减少界面开发者的学习成本, 也可以大大减少应用程序 中, 用于与界面交互部分的代码量。 例如: 初始化接口, 用于接收指令 对应用程序界面动态生成装置进行初始化; 界面描述接口, 用于接收界 面描述文件; 元素获取接口, 用于接收指令输出生成的应用程序界面中 的界面元素。 具体接口根据所需实现的功能, 还可以有很多, 这里就不 再一一赘述了。
界面描述解释器 1102, 与所述外部接口 1101相连, 从所述外部接 口接收界面描述文件, 根据预设的界面元素的描述定义解析界面描述文 件, 得到界面元素的相关信息。
界面描述解释器 1102可以接收 XML格式的界面描述文件并根据预 设的界面元素的描述定义解析 XML格式的界面描述文件, 得到界面元 素的相关信息。 界面元素的相关信息是用于创建界面元素以及对界面元 素进行布局, 生成界面所需的一些信息, 如属性信息和布局信息; 属性 信息包括界面元素的类型、 例如按钮、 单选框、 文本框等, 以及该类型 下的具体属性信息, 界面元素属性与具体图形库相关, 本实施例中采用
GTK图形库, 因此定义的元素属性最好与 GTK图形库可以尽量保持一 致, 以方便理解。 布局信息包括: 如界面元素的位置、 大小、 各界面元 素之间的容纳关系等。 当然, 具体如何对界面元素的 XML描述进行定 义可以根据具体需要确定, 相关信息具体包含的信息内容也可以根据需 要确定。
界面生成器 1103 , 与所述界面描述解释器 1102相连, 根据所述界 面元素的相关信息调用预先封装的界面元素代码创建并设置界面元素; 对界面元素进行布局, 生成应用程序界面。
其中, 界面生成器具体根据相关信息中包含的具体信息不同, 可以 包含不同的具体实现模块, 以属性信息和布局信息为例, 界面生成器中 具体可以包括元素管理器和布局管理器。
图 3 为本发明应用程序界面动态生成装置第二实施例的结构示意 图; 如图 3所示, 该装置包括: 外部接口 301、 界面描述解释器 302、 元素管理器 303、 布局管理器 304; 其中, 外部接口 301和界面描述解 释器 302与实施例一中作用相同, 而元素管理器 303、 布局管理器 304 是实施例一中界面生成器 1103的具体实现。
外部接口 301 , 与界面描述解释器 302相连, 接收界面描述文件并 输出至界面描述解释器 302;
界面描述解释器 302, 与外部接口 301相连, 从外部接口 301 元素管理器 303 , 与界面描述解释器 302相连, 根据从界面描述解 释器 302接收的属性信息调用预先封装的界面元素代码, 创建并设置界 面元素。 元素管理器用于对界面元素进行动态维护, 包括创建元素、 设 置元素属性、 销毁元素等, 这些具体维护功能在 GTK原语中都有定义, 这里就不再——赘述了, 而元素的逻辑行为, 比如按钮的点击事件处理 等, 则可交给应用程序自行监控和处理, 例如在外部接口 301中提供实 现对元素逻辑行为的监控和处理的接口功能, 以保持应用程序开发的灵 活性, 当然也可以由元素管理器来实现, 具体实现方法这里就不——赘 述了。
布局管理器 304, 与界面描述解释器 302及元素管理器 303相连, 根据从界面描述解释器接收的布局信息, 对所述元素管理器 303创建的 界面元素进行布局, 得到需要的应用程序界面; 排布时可以充分利用 GTK图形库提供的排布功能进行排布。 GTK采用容器机制来合理分离 控件的职责, 差不多所有界面元素都是容器, 都可以容纳其它任何界面 元素; 用 layout机制动态计算各子窗口的坐标位置, 自适应屏幕大小的 变化。 因此布局管理器可以完全采用 GTK的布局方式来对界面元素进 行布局, 当然, 也可以根据具体需要确定布局方式。
预先封装的界面元素代码是基于 GTK 图形库的语法生成的, 相当 于界面元素的代码模版, 生成界面元素时, 可以套用这些预设的模版来 生成具体的界面元素。
图 4 为本发明应用程序界面动态生成装置第三实施例的结构示意 图; 如图 4所示, 该装置在第二实施例的基础上, 除包括外部接口 401、 界面描述解释器 402、 元素管理器 403、 布局管理器 404之外, 还进一 步包括了功能扩展模块 405, 与界面描述解释器 402相连, 用于记录界 面描述解释器 402解析出的所有界面元素的属性和布局信息。 通过记录 这些信息, 应用程序可以对界面元素的样式或颜色等属性进行统一的修 改, 实现界面的主题皮肤更改或换色等功能, 其它功能可以根据需要进 行添加, 这里就不——赘述了。 通过功能扩展模块 405, 本发明的应用 程序界面动态生成装置可以提供更加丰富的界面功能。 图 5为本发明的界面描述解释器第一实施例的结构示意图, 如图 5 所示, 该界面描述解释器包括:
元素定义模块 501 , 用于保存界面元素的描述定义。
属性信息解析模块 502, 与元素定义模块 501相连, 用于根据元素 定义模块 501中保存的描述定义从界面描述文件中, 解析出界面元素的 属性信息。
布局信息解析模块 503 , 与元素定义模块 501相连, 用于根据元素 定义模块 501中保存的描述定义从界面描述文件中, 解析出界面元素的 布局信息。
图 6为本发明的界面描述解释器第二实施例的结构示意图, 如图 6 所示, 所述界面描述解释器除包括与图 5 中功能相同的元素定义模块 601 , 属性信息解析模块 602, 布局信息解析模块 603外, 进一步包括: 模版类信息解析模块 604, 与所述元素定义模块 601相连, 用于根 据元素定义模块 601中保存的描述定义从界面描述文件中, 解析出界面 元素的模版类信息;
属性信息解析模块 602在图 5所示的第一实施例的基础上进一步与 模版类信息解析模块 604相连, 根据所述模版类信息解析出界面元素的 属性信息;
布局信息解析模块 603在图 5所示的第一实施例的基础上进一步与 模版类信息解析模块 604相连, 根据所述模版类信息解析出界面元素的 布局信息。
图 7为本发明元素管理器实施例的结构示意图, 如图 7所示, 所述 元素管理器包括:
元素创建模块 701 , 用于根据界面元素的属性信息调用预先保存的 界面元素生成代码, 创建界面元素; 元素设置模块 702, 与所述元素创建模块 701相连, 用于根据界面 元素的属性信息对所述元素创建模块 701创建的界面元素进行设置。
在上述两实施例中, 界面描述中对界面元素的定义可根据需要自行 设定, 具体的定义可以通过配置文件实现, 通过修改配置文件可以修改 对界面元素的描述定义规则, 从而更加灵活地对界面元素的描述定义进 行修改, 下面提供一些具体的描述定义规则例子, 可供参考。
XML格式界面描述的定义举例如下:
<window name=" Login Wnd" position="0,0" size="510,430" title="Sign On" >
这段描述表示新建一个窗口, 其中 window name表示窗口名字, position表示位置, size表示大小, title表示窗口标题, 这些语句和格式 被预先定义好, 根据这些定义对界面描述信息进行解析。
该描述所对应的基于 GTK原语实现的伪代码如下:
m_gtkWindow = gtk_window_new();
gtk_window_set_title(GTK_WINDOW(m_gtkWindow),"Sign On"); gtk_widget_set_size_request(m_gtkWindow,510,430);
gtk_window_set_position(GTK_WINDOW(m_gtkWindow),0,0); 又如:
<button align:" container" size="90,48" label="Enter" name="btnEnter" />
这段描述表示新建一个按钮, button align="container"表示该按钮为 谷 。
该描述所对应的基于 GTK原语实现的伪代码如下:
m_gtkButton = gtk_button_new();
gtk_button_set_label(GTK_BUTTON(m_gtkButton ),"Enter");
gtk_widget_set_size_request(m_gtkButton ,90,48); gtk_container_add(GTK_CONTAINER(m_gtkWindow ),m_gtkButt on )
上述两段描述与 GTK原语的定义基本一致, 非常利于理解, 另夕卜, 除了元素的定义和属性和 GTK的函数原语保持一致性外, 在界面元素 的排布和布局上, 也尽量采用 GTK本身的容器自适应特性, 如上面代 码中的 align=" container" 对应的 gtk_container_add;这样就能保证 Resize 效率的最大化, 也确保用户在 Resize窗口时, 窗口内各个元素能够平滑 的自动调整所在位置和大小。
在实际应用中, 由于 GTK 图形库提供的元素本身功能强大, 属性 众多, 接口方法也比较多, 在 XML格式的界面描述中——描述这些元 素的属性会比较繁瑣; 且一般来说, 应用程序所需求的界面中, 有许多 的元素具备相同的或类似的特点, 它们的属性具备一定的共性, 会出现 比较多的重复的描述内容。 如下所示:
<Box name="myMainBoxl " >
<prop align="packstart" expand="false" fill="false" pad="0"/> <prop boxType="vbox" homogeneous="false" spacing="0"/> </Box >
<Box name="myMainBox2" >
<prop align="packstart" expand="false" fill="false" pad="2"/> <prop boxType="vbox" homogeneous="false" spacing="0"/>
</Box >
上面的界面描述中, 两个界面元素几乎一样, 只有" pad"属性不同。 针对以上问题, 基于 XML界面元素配置的定义, 可以采用元素属性模 板类设计。 根据产品特性的特点, 预先通过 XML定义一些常用的或者 具备较大通用性的元素或局部界面的描述内容作为元素模板类, 在实际 应用场景下, 直接使用这些元素模板类描述元素。 个别地方具备个性化 的或者和模板元素具有一定差异性的属性, 可以由应用程序界面描述中 自行重新描述, 例如:
<Class name="vbox" >
<prop align="packstart" expand="false" fill="false" pad="0"/> <prop boxType="vbox" homogeneous="false" spacing="0"/> </Class>
<Box name="myMainBoxl" class="vbox" pad="2"> <Box name="myMainBox2" class="vbox" > 上述模版中, <Class name="vbox" >和</( ^^>之间的部分就是定 义的模版类, 下面在描述界面元素时, 就可以直接使用模版类来描述界 面元素, 对于和模版类中不完全相同的部分, 只需要将不同的部分 pad="2' '添加在模版类之后即可。通过定义界面元素的模版类属性, 可以 大大减少界面描述文件中对于相同界面元素的描述复杂度和难度, 提高 界面描述的生成效率。 如果定义了界面元素的模版类属性, 则元素创建 模块 701 , 将进一步用于根据所述界面元素的模版类信息调用预先封装 的元素模版和界面元素代码, 创建界面元素。
下面将具体介绍本发明实施例的应用程序界面动态生成方法。
图 8为本发明应用程序界面动态生成方法实施例的流程图, 如图 8 所示, 该方法包括如下步骤:
步骤 801 , 接收界面描述文件;
步骤 802, 根据预设的界面元素的描述定义对界面描述文件进行解 具体来说, 解析时可以依次获取界面描述文件中描述的界面元素, 判断所述界面元素是否合法并且可支持, 若是, 则获取该界面元素的描 述内容, 根据预设的界面元素的描述定义对该界面元素的描述内容进行 解析, 创建界面元素并进行布局; 否则从界面描述文件中获取下一个界 面元素的描述内容, 直到界面描述中所有的界面元素都布局完成, 即构 造出了与界面描述文件对应的应用程序界面。
另外, 若判断所述界面元素合法并且可支持, 则可以进一步判断所 述界面元素是否含有模版类信息, 若是, 则获取该界面元素的模版类信 息, 并根据预设的模版类信息与界面元素的描述内容之间的对应关系, 获取该界面元素的描述内容。
步骤 803, 根据所述界面元素的相关信息调用预先封装的界面元素 代码创建并设置界面元素, 对界面元素进行布局, 生成应用程序界面。
具体可以根据属性信息调用预先封装的界面元素代码创建并设置 界面元素,根据所述布局信息对界面元素进行布局,生成应用程序界面。
图 9为本发明动态界面生成方法第一实施例的具体流程图, 如图 9 所示, 该流程包括如下步骤:
步骤 901 , 加载 XML界面描述文件。
通过外部接口接收 XML界面描述文件, 并按照预先定义的描述进 行解析, 解析出界面元素的属性信息和布局信息。 如果预先还定义了界 面元素的模版类属性, 则还会解析出界面元素的模版类信息。
步骤 902, 获取下一个界面元素, 若有, 则执行步骤 903, 否则结 束流程。
逐一获取解析出的界面元素, 直至获取全部解析出的界面元素。 步骤 903,判断界面元素是否合法且可支持,若是,则执行步骤 904, 否则返回步骤 902。
这一步需要判断界面元素是否符合预先的定义或者可以支持该元 素的处理, 如果界面元素符合预先的定义且可以支持, 则继续下一步操 作, 否则认为该界面元素非法或者不能支持, 对该界面元素可以不进行 处理或返回错误提示; 判断界面元素是否合法和可支持, 可以根据预设 的界面描述语法来判断, 描述内容符合语法规定和要求的, 即可认为合 法, 符合语法且描述内容也有预先定义的, 即可判断为可支持, 具体判 断方法属于现有成熟技术, 这里就不再赘述了。
步骤 904, 载入元素属性。
将界面元素的属性信息和布局信息加载到内存或緩存中。
步骤 905, 创建 GTK元素。
按照界面元素属性信息, 调用预先封装的界面元素代码,基于 GTK 图形库的原语创建相应的 GTK元素。
步骤 906, 设置 GTK元素属性并进行布局, 返回步骤 902。
对创建的 GTK元素按照属性信息进行设置, 按照布局信息进行布 局。
当所有界面元素都完成属性设置和布局后, 也就是步骤 902中无法 再获取到界面元素后, 界面构造完毕, 开发者可以按照元素名称获取 GTK元素对象, 专注于程序的逻辑开发, 不必关心繁杂的界面调整和布 局。
另外, 在界面构造完毕之后, 还可以进一步记录所述生成的应用程 序界面中所有界面元素的属性和布局信息。 以供应用程序对界面元素进 行统一的修改实现界面主题、 皮肤、 颜色更换等扩展功能。
图 10 为本发明动态界面生成方法第二实施例的具体流程图, 如图 10所示, 该流程包括如下步骤: 步骤 1001 ~ 1002与步骤 901~902相同。
步骤 1003 , 判断界面元素是否合法且可支持, 若是, 则执行步骤
1004, 否则返回步骤 1002。
步骤 1004, 判断界面元素是否包含模版类属性, 若是则执行步骤
1005 , 否则执行步骤 1006。
步骤 1005 , 载入模版类属性。
载入界面元素的模版类公共属性。
步骤 1006, 载入元素属性。
载入界面元素本身区别于模版类公共属性的私有属性, 也就是区别 于界面元素的模版类信息的区别信息。
步骤 1007~1008, 与步骤 905~906相同, 这里不再赘述。
第二实施例中, 增加了对模版类属性的支持。 可以减少同类元素属 性描述的复杂度。
由上述的实施例可见, 本发明的应用程序界面动态生成装置和方 法, 通过预先定义的界面描述来生成应用程序界面, 应用程序的逻辑代 码部分无须参与具体的界面生成, 只需要提供界面描述文件, 由应用程 序界面动态生成装置通过预先封装的界面元素代码, 创建并布局界面元 素, 动态生成所需要的界面部分, 应用程序的逻辑代码部分无须包含具 体界面生成代码, 使得逻辑代码部分与界面代码部分的耦合度大幅度降 低,使应用程序界面设计更加灵活,减少后期维护成本和界面开发难度。 另外, 通过定义界面元素的模版类属性, 可以进一步减少界面描述的复 杂度和开发难度。 通过对生成的各界面以及界面中所有界面元素属性的 记录, 可以进一步提供例如主题皮肤更换、 换色等扩展界面功能, 使得 界面开发更加方便。
所应理解的是, 以上所述仅为本发明的较佳实施方式而已, 并不用 于限定本发明的保护范围, 凡在本发明的精神和原则之内, 所做的任何 修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权利要求书
1、 一种应用程序界面动态生成装置, 其特征在于, 该装置包括: 外部接口, 与界面描述解释器相连, 接收界面描述文件并输出至界 面描述解释器;
界面描述解释器, 与所述外部接口相连, 从所述外部接口接收界面 描述文件, 根据预设的界面元素的描述定义解析界面描述文件, 得到界 面元素的相关信息;
界面生成器, 与所述界面描述解释器相连, 根据所述界面元素的相 关信息调用预先封装的界面元素代码创建并设置界面元素; 对界面元素 进行布局, 生成应用程序界面。
2、 如权利要求 1所述的应用程序界面动态生成装置, 其特征在于, 所述界面描述解释器包括:
元素定义模块, 用于保存界面元素的描述定义;
属性信息解析模块, 与所述元素定义模块相连, 用于^ ^据所述元素 定义模块中保存的所述描述定义从界面描述文件中, 解析出所述界面元 素的相关信息中的属性信息;
布局信息解析模块, 与所述元素定义模块相连, 用于^ ^据所述元素 定义模块中保存的所述描述定义从界面描述文件中, 解析出所述界面元 素的相关信息中的布局信息。
3、 如权利要求 2所述的应用程序界面动态生成装置, 其特征在于, 所述界面生成器包括:
元素管理器, 与界面描述解释器相连, 根据从界面描述解释器接收 的属性信息调用预先封装的界面元素代码, 创建并设置界面元素;
布局管理器, 与界面描述解释器相连, 根据从界面描述解释器接收 的布局信息, 对所述元素管理器创建的界面元素进行布局, 生成应用程 序界面。
4、 如权利要求 3所述的应用程序界面动态生成装置, 其特征在于, 所述元素管理器包括:
元素创建模块, 用于根据界面元素的属性信息调用预先保存的界面 元素代码, 创建界面元素;
元素设置模块, 与所述元素创建模块相连, 用于根据界面元素的属 性信息对所述元素创建模块创建的界面元素进行设置。
5、 如权利要求 4所述的应用程序界面动态生成装置, 其特征在于, 所述元素定义模块, 进一步用于保存元素模版的描述定义;
所述界面描述解释器进一步包括:
模版类信息解析模块, 与所述元素定义模块相连, 用于根据所述元 素定义模块中保存的元素模版的描述定义从界面描述文件中, 解析出界 面元素的模版类信息;
所述元素创建模块, 进一步用于根据所述界面元素的模版类信息调 用预先封装的元素模版和界面元素代码, 创建界面元素。
6、如权利要求 1或 2所述的应用程序界面动态生成装置,其特征在 于, 所述外部接口包括:
初始化接口, 用于接收指令对应用程序界面动态生成装置进行初始 化;
界面描述接口, 用于接收界面描述文件;
元素获取接口, 用于接收指令输出生成的应用程序界面中的界面元 素。
7、 如权利要求 3所述的应用程序界面动态生成装置, 其特征在于, 该装置进一步包括: 功能扩展模块, 与所述界面描述解释器相连, 用于记录所述界面描 述解释器解析出的所有界面元素的属性和布局信息。
8、 一种应用程序界面动态生成方法, 其特征在于, 该方法包括: 接收界面描述文件;
根据预设的界面元素的描述定义对界面描述文件进行解析, 得到界 面元素的相关信息;
根据所述界面元素的相关信息调用预先封装的界面元素代码创建并 设置界面元素, 对界面元素进行布局, 生成应用程序界面。
9、 如权利要求 8所述的应用程序界面动态生成方法, 其特征在于, 所述界面元素的相关信息包括: 属性信息和布局信息。
10、如权利要求 9所述的应用程序界面动态生成方法,其特征在于, 所述根据所述界面元素的相关信息调用预先封装的界面元素代码创建 并设置界面元素, 对界面元素进行布局, 生成应用程序界面包括:
根据所述属性信息调用预先封装的界面元素代码创建并设置界面元 素, 根据所述布局信息对界面元素进行布局, 生成应用程序界面。
11、如权利要求 10所述的应用程序界面动态生成方法,其特征在于, 所述得到界面元素的属性信息和布局信息之后, 根据所述属性信息调用 预先封装的界面元素代码创建并设置界面元素之前, 进一步包括:
依次获取解析出的界面元素, 判断所述解析出的界面元素是否合法 并且可支持, 若是, 则获取该界面元素的属性信息和布局信息; 否则获 取下一个解析出的界面元素。
12、如权利要求 11所述的应用程序界面动态生成方法,其特征在于, 若判断所述界面元素合法并且可支持, 则进一步判断所述解析出的界面 元素是否含有模版类信息, 若是, 则先获取该界面元素的模版类信息, 再获取该界面元素区别于模版类信息的区别信息。
13、 如权利要求 9~12 中任一项权利要求所述的应用程序界面动态 生成方法, 其特征在于, 所述生成应用程序界面之后, 进一步记录所述 解析出的所有界面元素的属性和布局信息。
PCT/CN2010/070499 2009-02-10 2010-02-03 应用程序界面动态生成装置及方法 WO2010091623A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910005665.0 2009-02-10
CNA2009100056650A CN101477461A (zh) 2009-02-10 2009-02-10 应用程序界面动态生成装置及方法

Publications (1)

Publication Number Publication Date
WO2010091623A1 true WO2010091623A1 (zh) 2010-08-19

Family

ID=40838183

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/070499 WO2010091623A1 (zh) 2009-02-10 2010-02-03 应用程序界面动态生成装置及方法

Country Status (2)

Country Link
CN (1) CN101477461A (zh)
WO (1) WO2010091623A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984174A (zh) * 2018-07-03 2018-12-11 百度在线网络技术(北京)有限公司 跨平台的应用创建方法、装置、服务器和存储介质

Families Citing this family (37)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477461A (zh) * 2009-02-10 2009-07-08 腾讯科技(深圳)有限公司 应用程序界面动态生成装置及方法
US20110088011A1 (en) * 2009-10-14 2011-04-14 Vermeg Sarl Automated Enterprise Software Development
CN102118649A (zh) * 2009-12-31 2011-07-06 康佳集团股份有限公司 一种网络电视界面切换的方法及切换装置
CN102541566A (zh) * 2012-01-04 2012-07-04 北京七星华创电子股份有限公司 半导体软件界面框架生成方法
CN102722367B (zh) * 2012-05-21 2015-11-25 深圳市茁壮网络股份有限公司 一种数据处理的方法、处理器及终端
CN102890632A (zh) * 2012-09-18 2013-01-23 深圳市融创天下科技股份有限公司 一种屏幕自适应方法、系统和终端设备
CN102945161A (zh) * 2012-10-24 2013-02-27 中国航空工业集团公司西安飞机设计研究所 一种基于嵌入式系统的格式化页面显示控制实现方法
CN103019683A (zh) * 2012-11-20 2013-04-03 北京思特奇信息技术股份有限公司 一种动态配置页面视图的方法
CN103902256B (zh) * 2012-12-24 2017-05-10 航天信息股份有限公司 一种界面的生成系统和方法
CN103530338B (zh) * 2013-10-01 2017-02-15 北界创想(北京)软件有限公司 在计算设备上进行页面渲染的框架及生成页面的方法
CN103617037B (zh) * 2013-11-27 2017-12-08 邵寻 用于web开发系统的开发方法和web开发系统
CN103823676B (zh) * 2014-02-14 2018-01-30 珠海市君天电子科技有限公司 显示控制方法、装置和客户端
CN105094768A (zh) * 2014-05-06 2015-11-25 北大方正集团有限公司 应用界面生成方法和应用界面生成装置
CN105094769B (zh) * 2014-05-06 2018-07-13 北大方正集团有限公司 用户界面的处理方法和装置
CN104090749B (zh) * 2014-05-30 2015-09-16 爱培科科技开发(深圳)有限公司 一种WinCE产品界面主题更新变换处理方法及系统
CN104239044B (zh) * 2014-09-05 2017-07-28 北京航天自动控制研究所 一种图形用户界面动态生成方法
CN104267968B (zh) * 2014-10-16 2017-12-26 福建星网视易信息系统有限公司 界面切换的方法和装置
CN104331284A (zh) * 2014-10-29 2015-02-04 北京思特奇信息技术股份有限公司 一种动态页面生成展示方法及系统
CN104360866A (zh) * 2014-12-01 2015-02-18 深圳七彩畅想网络技术有限公司 一种代码生成方法及代码生成器
CN104484171B (zh) * 2014-12-11 2018-05-29 深圳市路通网络技术有限公司 终端界面设计系统、方法及相关设备
CN105786455B (zh) * 2014-12-17 2020-02-18 深圳市腾讯计算机系统有限公司 一种数据处理方法、装置及终端
CN104657039B (zh) * 2015-02-12 2018-01-09 广州华多网络科技有限公司 一种界面主题显示方法、系统和服务设备
CN104731590B (zh) * 2015-03-13 2018-04-27 广东欧珀移动通信有限公司 一种用户界面控件实现方法及装置
CN106162353A (zh) * 2015-03-25 2016-11-23 中兴通讯股份有限公司 界面处理方法、装置及系统
CN106293658B (zh) * 2015-05-20 2020-11-27 腾讯科技(深圳)有限公司 一种界面组件生成方法及其设备
CN104915201A (zh) * 2015-05-29 2015-09-16 北京奇艺世纪科技有限公司 一种界面生成方法和装置
CN106708490A (zh) * 2015-11-17 2017-05-24 百度在线网络技术(北京)有限公司 一种应用程序的界面设定方法及装置
CN106970926A (zh) * 2016-01-14 2017-07-21 卓望数码技术(深圳)有限公司 一种移动应用界面动态生成方法及系统
CN105718289B (zh) * 2016-01-21 2020-12-29 腾讯科技(深圳)有限公司 一种组件关系建立方法及其设备
CN105867931B (zh) * 2016-04-07 2019-05-07 北京橙鑫数据科技有限公司 信息展示界面的变更方法和装置
WO2018137144A1 (zh) * 2017-01-24 2018-08-02 北京广利核系统工程有限公司 一种图形用户界面gui系统
CN107506227A (zh) * 2017-09-04 2017-12-22 郑州云海信息技术有限公司 管理编译代码的方法和装置
CN107562428A (zh) * 2017-09-08 2018-01-09 上海博科资讯股份有限公司 基于规则的自适应软件界面布局方法及系统
CN109117228A (zh) * 2018-08-01 2019-01-01 浙江口碑网络技术有限公司 图形界面的生成方法及装置
CN111026366B (zh) * 2019-11-12 2023-09-22 贝壳技术有限公司 用户界面实现方法、装置、存储介质及电子设备
CN113741834A (zh) * 2020-05-29 2021-12-03 Oppo(重庆)智能科技有限公司 界面显示方法、装置、电子设备和计算机可读存储介质
CN111694345B (zh) * 2020-06-24 2021-11-12 深圳市元征科技股份有限公司 一种车辆诊断菜单生成方法、装置、设备及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614557A (zh) * 2003-11-04 2005-05-11 西门子公司 用于动态生成用户界面的方法和系统
CN1304945C (zh) * 2004-06-02 2007-03-14 中兴通讯股份有限公司 一种电信设备配置界面自动生成方法
CN101266543A (zh) * 2008-01-14 2008-09-17 中兴通讯股份有限公司 一种图形界面处理装置和方法
CN101477461A (zh) * 2009-02-10 2009-07-08 腾讯科技(深圳)有限公司 应用程序界面动态生成装置及方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614557A (zh) * 2003-11-04 2005-05-11 西门子公司 用于动态生成用户界面的方法和系统
CN1304945C (zh) * 2004-06-02 2007-03-14 中兴通讯股份有限公司 一种电信设备配置界面自动生成方法
CN101266543A (zh) * 2008-01-14 2008-09-17 中兴通讯股份有限公司 一种图形界面处理装置和方法
CN101477461A (zh) * 2009-02-10 2009-07-08 腾讯科技(深圳)有限公司 应用程序界面动态生成装置及方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984174A (zh) * 2018-07-03 2018-12-11 百度在线网络技术(北京)有限公司 跨平台的应用创建方法、装置、服务器和存储介质

Also Published As

Publication number Publication date
CN101477461A (zh) 2009-07-08

Similar Documents

Publication Publication Date Title
WO2010091623A1 (zh) 应用程序界面动态生成装置及方法
CN110825362B (zh) 低代码应用软件开发系统及方法
AU2012203071B2 (en) Computer-implemented method, system and computer program product for displaying a user interface component
CN106547681B (zh) 数据自动加载并复用模拟服务测试的方法和装置
KR20050039551A (ko) 컴퓨터 플랫폼용 프로그래밍 인터페이스
US9459842B1 (en) Multivariable transfer functions
KR20020035567A (ko) 레거시 데이터 구조용 객체 속성 메타 모델 에뮬레이터
JP2005346722A (ja) フォームタイプを使用してフォームを生成する方法および装置
WO2022141724A1 (zh) 基于 Vue 组件化的可视化配置渲染方法、系统、终端
JP2016534419A (ja) ネイティブモバイルアプリケーションコードのコンピュータ支援開発
US11349902B2 (en) System and method to standardize and improve implementation efficiency of user interface content
CN113064593B (zh) 移动app动态化的方法、装置、计算机设备及存储介质
CN113590104B (zh) 实现图形化无代码软件开发平台及方法
CN101727327B (zh) 一种基于gef技术可视化jsp界面的开发方法
US20230325209A1 (en) User Interface Implementation Method and Apparatus
Shen et al. HCI⁁ 2 Workbench: A development tool for multimodal human-computer interaction systems
WO2022099913A1 (zh) 界面配置方法、装置、设备及介质
EP3834080B1 (en) Static reconcilliation of application view hierarchies
CN113342399A (zh) 应用项目的结构配置方法、装置及可读存储介质
Lee et al. Design and implementation of the WIPI-to-Android automatic mobile game converter for the contents compatibility in the heterogeneous mobile OS
Fan et al. Middleware software for embedded systems
Gotti et al. A Model Driven approach for multi-platform execution of interactive UIS designed with IFML
EP4216052A1 (en) Method for developing mvvm architecture-based application, and terminal
CN117724704A (zh) 一种智能建造管理系统快速构建方法、装置、设备及介质
Chernomordov et al. Development of the Module «Version the Visually Impaired» for the Websites of Organizations

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10740912

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 5515/CHENP/2011

Country of ref document: IN

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 19/01/2012)

122 Ep: pct application non-entry in european phase

Ref document number: 10740912

Country of ref document: EP

Kind code of ref document: A1