Message distribution method and apparatus in application program

A message distribution and application technology, applied in the field of computer programming, can solve problems such as unfavorable later maintenance, confusion of application code, repeated definition of messages, etc., and achieve the effect of facilitating code maintenance and reducing complexity

Active Publication Date: 2018-05-11
SHENZHEN LEXIN SOFTWARE TECH CO LTD
View PDF3 Cites 23 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, in the above process, when defining messages, since iOS is a closed-source system, developers cannot know the names of messages already defined in the message center, which leads to: On the one hand, in the process of APP development, different developers The same message will be named differently. During the running of the APP, the message may be repeatedly defined in the message center, making the code of the application more confusing and less readable, which is not conducive to later maintenance; on the other hand , if a message receiver only registers the name of the message when registering the message, but does not register the method to realize the message, after the message receiver receives the message, due to the lack of the method to realize the message, the application program crash

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
  • Message distribution method and apparatus in application program
  • Message distribution method and apparatus in application program
  • Message distribution method and apparatus in application program

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, but not to limit the present invention. In addition, it should be noted that, for the convenience of description, only some structures related to the present invention are shown in the drawings but not all structures.

[0031]In the current development process for APPs running on iOS, since the message center provided by iOS for defining and registering messages is closed to developers, developers cannot obtain the names of messages defined in the APP. When different developers develop the same APP, they may name the same message differently, which leads to confusing APP codes and low readability. When maintaining the APP in the later stage, for example, when you want to modify the parameters in a certain message, since the messa...

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 invention discloses a message distribution method and apparatus in an application program. The method comprises the following steps: when an observer center determines that a message sender is about to send a first message, calling a message sending method, wherein the message sending method is used for instantiating a message receiver of a first message in a first member attribute according to an identifier of the first message and a mapping relationship, and determining whether the message receiver of the first message comprises a method for implementing the first message, wherein the first message is contained in a defined message, the first message comprises the identifier of the first message, if the observer center determines that the message receiver of the first message comprises the method for implementing the first message, controlling the message receiver of the first message to call the method for implementing the first message according to the identifier of the methodfor implementing the first message. The problem of code confusion of the current APP and the problem of crash of the APP in a running process are solved.

Description

technical field [0001] The embodiment of the present invention relates to computer programming technology, and in particular to a method and device for distributing messages in an application program. Background technique [0002] With the development of communication and computer technology, terminal devices such as mobile phones are used more and more widely. The operating system of the terminal device provides a message distribution mechanism: a certain class in the application program (hereinafter referred to as the message sender) can send a message to another class in the application program (hereinafter referred to as the message receiver), so as to realize the message receiver Call the method that implements the message. For example, the message sender can be the login interface of the application program, and the message receiver can be the response class after login. After the login interface receives the confirmation login information input by the user, it can se...

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): H04L12/58H04L29/08
CPCH04L51/066H04L67/146H04L67/34H04L51/214H04L67/55
Inventor 郭亚京
Owner SHENZHEN LEXIN SOFTWARE TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products