Method and system for orderly processing multiple Ajax data sources

A data source and function technology, applied in the direction of program control devices, etc., can solve the problems of uneven return data time, inability to determine the order of multiple requests to return data, accurate processing, etc.

Inactive Publication Date: 2015-12-16
INSPUR BEIJING ELECTRONICS INFORMATION IND
View PDF3 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] But when we need to call multiple Ajax data sources to get different data, due to its asynchronous call characteristics, Ajax will initiate multiple requests at the same time, but the time to return data is uneven,

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 system for orderly processing multiple Ajax data sources
  • Method and system for orderly processing multiple Ajax data sources
  • Method and system for orderly processing multiple Ajax data sources

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0024] The invention provides a method for orderly processing multiple Ajax data sources, figure 1 A flow chart of Embodiment 1 of the method for orderly processing multiple Ajax data sources of the present invention is shown, including:

[0025] Step S101: determining multiple Ajax data sources to be called and their calling order;

[0026] There are N Ajax data sources to be requested to read, and the sequence is determined to be Ajax1, Ajax2...AjaxN.

[0027] Step S102: Encapsulate each of the Ajax data sources into a corresponding data source function, the data source function defines a callback function and a global variable, the callback function is a parameter of the data source function, in the data source When the function is called, the data in the Ajax data source corresponding to the data source function is copied to the global variable;

[0028] Package Ajax1, Ajax2...AjaxN into corresponding data source functions ajaxFunction1, ajaxFunction2,...ajaxFunctionN, s...

Embodiment 2

[0039] The present invention also provides a system for orderly processing multiple Ajax data sources, image 3 It shows a schematic structural diagram of Embodiment 2 of the system for orderly processing multiple Ajax data sources of the present invention, including a determination module 101, a function encapsulation module 102, a nesting module 103 and an operation module 104;

[0040] The determining module 101 is used to determine multiple Ajax data sources to be called and their calling sequence;

[0041] The function encapsulation module 102 is used to encapsulate each of the Ajax data sources into a corresponding data source function, the data source function defines a callback function and a global variable, and the callback function is the data source function of the data source function parameter, when the data source function is called, the data in the Ajax data source corresponding to the data source function is copied to the global variable;

[0042] The nesting...

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 method and a system for orderly processing a plurality of Ajax data sources. A plurality of Ajax data sources to be called and a calling sequence of the Ajax data sources are determined; each Ajax data source is respectively packaged into a corresponding data source function; each data source function defines a callback function and a global variable, wherein the callback function is a parameter of the data source function; when the data source functions are called, data in the Ajax data sources corresponding to the data source functions is replicated into the corresponding global variables; and starting from the last Ajax data source in the calling sequence, each data source function is used as the parameter of a previous data source function for carrying out nesting to obtain a nesting function and the nesting function is operated. When the nesting function is operated, each data source function is called sequentially, the data in the Ajax data source corresponding to the data source function is replicated into the corresponding global variable in the calling process, and finally, the data of each Ajax data source with the calling sequence can be acquired in the corresponding global variable and the data of a plurality of Ajax data sources can be read according to a sequence request.

Description

technical field [0001] The invention relates to the technical field of web page development, in particular to a method and system for orderly processing multiple Ajax data sources. Background technique [0002] Ajax is "AsynchronousJavascriptAndXML" (asynchronous JavaScript and XML), which refers to a web development technology for creating interactive web applications. In recent years, Ajax has become the main technology focus in web development, and various Ajax frameworks have been developed. Due to its asynchronous call, the foreground page can initiate a request to the background without refreshing and get the returned data, which greatly reduces the waiting time of the user and has a good user experience, so it is widely used. [0003] But when we need to call multiple Ajax data sources to get different data, due to its asynchronous call characteristics, Ajax will initiate multiple requests at the same time, but the time to return data is uneven, so it is impossible t...

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
IPC IPC(8): G06F9/44
Inventor 许磊
Owner INSPUR BEIJING ELECTRONICS INFORMATION IND
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