Week 9 - Web Flashcards

1
Q

What does AJAX stand for?

A

asynchronous javascript and XML

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

describe ajax flow control

A
user event
create promise or handler
send XMLHTTPRequest
server processes request
send reply html/json/text
response read by handler
UI updated or other action performed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what does the XMLHTTPRequest permit?

A

parts of a web page to be updated

without reloading the whole page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is AJAX?

A
Technique allowing clients to display active content requiring
communication with server
• without	user	having	to	reload	page	
• not	necessarily	asynchronous	
• not	necessarily	XML
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does CORS stand for?

A

cross-origin resource sharing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does CORS do?

A

adds HTTP headers which provide browsers with a way
to request remote URLs only if they have appropriate
permissions
— if a page loaded from one web server wants to access another it must request permission from the server by performing request

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does AJAX allow?

A

Ajax allows client-side code to interact with server
• request sent as HTTP GET or POST
• result string extracted from server response

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the 2 styles of asynchronous code in jS?

A

callbacks

promises

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a callback?

A

any executable code that is passed
as an argument to other code that is expected to call back
(execute) the argument at a given time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a promise?

A

an object that is used as a placeholder for the
eventual results of a deferred (and possibly asynchronous)
computation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are a promises’ 3 fields?

A
  • object that is promised
  • a function that is used to resolve/fulfil promise
  • a function that is used to reject the promise
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what does it mean if a promise is pending?

A

neither fulfilled nor rejected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an asynchronous function?

A

a function which
executes asynchronously via the event loop, using
an implicit Promise to return its result.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly