HTTP Flashcards

1
Q

What is a “web service”? What’s the advantage of distributing software as a web service?

A

A web service is a unit of managed code that can be remotely invoked using HTTP. That is, it can be activated using HTTP requests. Web services allow you to expose the functionality of your existing code over the network. Once it is exposed on the network, other applications can use the functionality of your program.

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

What’s the difference between REST and SOAP services?

A

SOAP is a protocol whereas REST is an architectural pattern. SOAP uses service interfaces to expose its functionality to client applications while REST uses Uniform Service locators to access to the components on the hardware device.

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

What does HTTP stand for?

A

Hypertext Transfer Protocol

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

What are the components inside of an HTTP request? What about an HTTP response?

A

HTTP request is divided into 3 parts:

A request line
A set of header fields
A body, which is optional

HTTP response is also divided into 3 parts:

Status line
Header
Body, optional
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

List the levels of HTTP status codes and what they mean

A

Informational responses (100–199)
Successful responses (200–299)
Redirection messages (300–399)
Client error responses (400–499)
Server error responses (500–599)

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

What are some specific HTTP status codes that are commonly used?

A

404
200
500

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

What is service-oriented architecture (SOA)?

A

A philosophy in which all interactions among computing devices are defined as services in a formal, standardized way.

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

How can you achieve loose coupling with SOA?

A

SOA accomplishes loose coupling through the use of contracts and bindings. A consumer asks a third-party registry for information about the type of service it wishes to use. The registry returns all the services it has available that match the consumer’s criteria.

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

What is an Enterprise Service Bus (ESB)?

A

An Enterprise Service Bus (ESB) is fundamentally an architecture. It is a set of rules and principles for integrating numerous applications together over a bus-like infrastructure.

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

What are some best practices when creating web services?

A

Accept and respond with JSON.
Use nouns instead of verbs in endpoint paths.
Name collections with plural nouns.
Nesting resources for hierarchical objects.
Handle errors gracefully and return standard error codes.
Allow filtering, sorting, and pagination.
Maintain Good Security Practices.

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