5-web-services-rest Flashcards

(21 cards)

1
Q

What are the 3 eras of distributed computing evolution?

A

1st: Internet (linked machines, TCP/IP). 2nd: WWW (linked documents, HTTP/HTML). 3rd: SOA (linked applications, web services/REST).

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

Why do we need Web Services?

A

Screen scraping websites is unreliable. Need to query web resources programmatically using standard formats.

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

What is a Web Service?

A

Business logic on Internet/intranet accessed using standard XML over protocols like HTTP or SMTP.

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

Why don’t Web Services replace other DS technologies?

A

They provide coarse-grained approach to exposing enterprise services on existing platforms (JEE, .NET, etc.) without constraining component technology.

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

Why use XML for data exchange?

A

Easily extended, self-describing, text-based (portable), standard and non-proprietary.

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

What is JSON?

A

JavaScript Object Notation - lightweight text-data interchange format. Language independent

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

What are the 5 capabilities of Web Services?

A

Described (service description language), Published (to registry), Discovered (standard mechanism), Invoked (declared API), Composed (with other services).

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

What are the features of Web Services?

A

Standardise packaging for transport, support sync/async communication modes, provide interoperability abstraction of RPC/RMI.

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

What is Resource-Based Architecture?

A

View DS as collection of resources individually managed by components, that can be added/removed/retrieved/modified remotely.

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

What are the 4 principles of Resource-Based Architecture?

A
  1. Single naming scheme (URIs). 2. Same interface for all services. 3. Self-described messages. 4. Stateless (server forgets caller).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is REST?

A

Representational State Transfer - architectural style for web services using HTTP with resources identified by URIs.

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

What protocol properties does REST use?

A

Client/server, Stateless, Cacheable, Layered.

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

What is a Resource in REST?

A

Anything with a URI - web page, image, data record, customer record.

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

What are the 4 HTTP verbs and their CRUD equivalents?

A

GET=Read, PUT=Update, POST=Create, DELETE=Delete.

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

Why is it called Representational State Transfer?

A

Client references resource via URL, gets representation back. Representation places client in a state. Following hyperlinks transfers to new states.

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

What is a key feature of REST responses?

A

Responses contain hyperlinks to related resources, allowing client to drill down for more detail.

17
Q

What is a logical URI?

A

Expresses what resource is desired, not a physical object. Don’t need million HTML pages for million parts.

18
Q

How is a Purchase Order submitted in REST?

A

Client creates PO document conforming to schema, submits as payload of HTTP POST.

19
Q

What are the 4 claimed benefits of REST?

A
  1. Improved response times (caching). 2. Improved scalability (stateless). 3. Less vendor dependency. 4. No separate discovery (uses hyperlinks).
20
Q

Is REST a standard?

A

No - it’s an architectural style that prescribes use of standards (HTTP, URI, XML/JSON).

21
Q

What is WSDL?

A

Web Services Description Language - describes web service interface (what requests, arguments, transport).