Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
data_access_and_analysis_api [2017/07/13 10:44]
mcgee
data_access_and_analysis_api [2017/07/13 10:45] (current)
mcgee [dataService.js]
Line 14: Line 14:
 Many functions dispatch a http POST  or GET to the back end. As these calls are asynchronous ​ the front end returns immediately rather than hang and wait for the response. Therefore we use promises, by which we specify functionality, ​ usually using a “.then” function, to handle the call when it does return. When the promise associated with a http call(or any asynchronous function) is returned on,  i.e. the "​then"​ function is invoked, the JavaScript ​ global variable "​this"​ may not necessarily point at the original data service object to avoid errors ​ so we set a "​self"​ variable within the parent functions cope to be used with asynchronous calls when they want to refer to this data service'​s attributes. Many functions dispatch a http POST  or GET to the back end. As these calls are asynchronous ​ the front end returns immediately rather than hang and wait for the response. Therefore we use promises, by which we specify functionality, ​ usually using a “.then” function, to handle the call when it does return. When the promise associated with a http call(or any asynchronous function) is returned on,  i.e. the "​then"​ function is invoked, the JavaScript ​ global variable "​this"​ may not necessarily point at the original data service object to avoid errors ​ so we set a "​self"​ variable within the parent functions cope to be used with asynchronous calls when they want to refer to this data service'​s attributes.
  
-Here we provide ​ a brief description of the data access functions offered by the service, but for more information see the service source file. All of the functions listed below make up the functionality that is used to access the back end data, ieThe data access API.00 ​+Here we provide ​ a brief description of the data access functions offered by the service, but for more information see the service source file. All of the functions listed below make up the functionality that is used to access the back end data as well as process the grpah on the server.
  
 ==== Get Data Methods==== ==== Get Data Methods====