Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for interaction between user interface (UI) and model layer data in application program

A user interface and application program technology, applied in the application program field, can solve problems such as memory leaks, non-compliance with the opening and closing principles, maintenance troubles, etc., and achieve the effects of improving performance, easy maintenance, and improving security

Inactive Publication Date: 2016-02-03
BEIJING AMAZGAME AGE INTERNET TECH CO LTD
View PDF3 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] 1) Different types of messages need to define a message number that does not conflict with other windows in the application, which is troublesome to maintain
[0005] 2) Messages can only be transmitted using two 32-bit integer data. If other data types are used to transmit, memory release issues need to be considered, which can easily cause memory leaks
[0006] 3) You must know the handle of the target window to send the message correctly
[0007] 4) If you want to add messages, you need to change the original code, which does not conform to the principle of opening and closing

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for interaction between user interface (UI) and model layer data in application program
  • Method and device for interaction between user interface (UI) and model layer data in application program
  • Method and device for interaction between user interface (UI) and model layer data in application program

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0058] In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0059] One of the core ideas of the embodiment of the present invention is that, in the embodiment of the present invention, the publisher (working thread) of the message data that will be used to update the user interface UI, and the subscriber (UI thread) that subscribes to the message data Being independent makes each module decoupled, which is convenient to adapt to the changing needs of users, thus improving the performance of the application and making it easier to maintain. In addition, the closure technology is used to ensure that the uncertainty of message processing will not be caused by the change of the operating environment when the message data is received, which improves the security of the system.

[0060] refer to...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention provides a method and a device for interaction between a user interface (UI) and model layer data in an application program. The method comprises: a UI thread receives message disposition notification sent from a worker thread; the UI thread acquires message data according to the message disposition notification; and the UI thread updates the UI by use of the message data. Through the adoption of the method and the device provided by the embodiment of the invention, the UI thread can update the interface when a data model changes, without using a cross-thread complex synchronization mechanism to realize interface update. When the model layer data changes, the change condition can be forwarded to the UI thread for interface update through an internally maintained message disposition queue, so that not only is logic realization simplified, but also the UI is decoupled from a data model layer, and a scalable and more dynamic network topology can be adapted more easily accordingly.

Description

technical field [0001] The present invention relates to the technical field of application programs, in particular to a method for interaction between a user interface UI in an application program and model layer data and a device for interaction between a user interface UI in an application program and model layer data. Background technique [0002] The UI (UserInterface, user interface) in the application program is also called the user interface, which is the medium for interaction and information exchange between the application program and the user. It realizes the conversion between the internal form of information and the form acceptable to the user. [0003] The program architecture of the application program uses the model layer to abstract all the data used to update the user interface UI in the application program. Generally, the user interface UI that interacts with the user is processed separately from the actual data. The actual data may come from the network, l...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/08G06F9/445
Inventor 洪晓健郭亮
Owner BEIJING AMAZGAME AGE INTERNET TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products