chapter 11 hell

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/153

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:02 AM on 3/19/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

154 Terms

1
New cards

What web application are not limited to other than delivering static html page

They need to send and receive data between the browser (or another client) and the server in the real time

2
New cards

Define web api

Interact that allows allows different software and application to communicate and exchange data over the web, typically using HTTP

3
New cards

What does Web api typical use?

Http

4
New cards

What does web api provide clearly define

A way for clients to request, modify and work with application data

5
New cards

What are some clients examples

Web browsers, mobile apps, smartwatch apps, other server

6
New cards

How do you design these app effectively as a developer

Using REST

7
New cards

What does REST stand for

REpresentational State Transfer

8
New cards

What is REST

A guiding principle when designing app

9
New cards

What is not rest

a protocol, format, or strict rulebook

10
New cards

What does Restful API principle follow

The three main prince-Les of how web component should interact with the internet

11
New cards

How many main principals is there

3

12
New cards

What are those 3 principals

Stateless communication, Resource based structure, Use of HTTP method

13
New cards

What is stateless communication

Every request is independent and contains all the information the
server needs.

14
New cards

What is Resource based structure

data and functionality are organized into distinct resources, each with a unique URL.

15
New cards

What is Use of HTTP method

Standard HTTP verbs indicate the desired actual on the resource

16
New cards

What are some HTTP verbs

GET, POST, PUT, DELETE

17
New cards

HOWS DOEs a restful web API presents all the server available resource

Clear and structure way

18
New cards

What is the RESTFUL web API presenting

Al, the server available resource

19
New cards

What happens after a RESTFUL web API presents the available resource in the server?

Making it a obvious way clients can access and how to interact with them

20
New cards

How is each resource defined

By a unique url

21
New cards

How can the resource be mani-ukated

Using standard HTTP methods

22
New cards

What are some form resources can take on

JSON, HTML, PLAIN TEXT/XML, images, videos, or other files

23
New cards

Why would a resource take a form of a JSON

Structured data exchange

24
New cards

Why would a resource take a form of a HTML

For web pages

25
New cards

Why would a resource take a form of a Plain text / xml

For simpler or legacy data formats

26
New cards

Why would a resource take a form of a images, videos, or other files

For media content

27
New cards

What do some resource require

Authentication or permission to access certain data

28
New cards

the API’s structure and available endpoints are fully _____

Visible

29
New cards

What are the benefits of having api structure and available endpoints fully visible for the clients

Clients can see what is possible even if they can’t access everything

30
New cards

What clarity would be provided having api structure and available endpoints fully visible for the developer

31
New cards

helps developers understand the system,

know which actions are allowed, and integrate with it reliably

32
New cards

In a restful api what is presented as resource

Data

33
New cards

In a restful api what can you do to data presented as resource

Created retrieved update delete

34
New cards

What is the operation collectively called when you create, retrieved, update, delete resources

CRUD

35
New cards

What does the C stand and what’s the operation performed in crud

Create A resource - Post request

36
New cards

What does the R stand and what’s the operation performed in crud

Read A resource - get request

37
New cards

What does the U stand and what’s the operation performed in crud

Update A resource - put or patch request

38
New cards

What does the D stand and what’s the operation performed in crud

delete A resource - Delete request

39
New cards

In a RESTful API for a site with songs, what would be the method, url and request if I want to get a list of all songs

Get, /songs, 200 OK

40
New cards

In a RESTful API for a site with songs, what would be the method, url and request if I want to get all rock songs from 202

Get, /songs?genre=rock&year=2020, 200 OK

41
New cards

In a RESTful API for a site with songs, what would be the method, url and request if I want to get a songs with ID 202

Get, /songs/202, 200 OK

42
New cards

In a RESTful API for a site with songs, what would be the method, url and request if I want to get lyrics for songs with ID 202

Get, /songs/202/lyrics, 200 OK

43
New cards

In a RESTful API for a site with songs, what would be the response if I want to get a non existing songs with ID 0

404 not found

44
New cards

In a RESTful API for a site with songs, what would be the method, url and request if I want to create a new song

Post, /songs, 201 created

45
New cards

In a RESTful API for a site with songs, what would be the method, url and request if I want tp update song with 202

PUT, /songs/202, 204 no content

46
New cards

In a RESTful API for a site with songs, what would be the method, url and request if I want tp update song with 202

Delete, /songs/202, 204 no content

47
New cards

In a RESTful API for a site with songs, what would be the method, url and request if I want tp get top 10 songs

Get, /songs/top?limit=10, 200 OK

48
New cards

In a RESTful API for a site with songs, what would be the method, url and request if I get all songs by artist with id 45

Get, /artist/45/songs, 200 OK

49
New cards

Whats are the six architectural constrains to a truly designed RESTful API

Client-server, stateless, cacheable, uniform interface, layered system, code on demand (optional)

50
New cards

Does the client and server share or separate responsibilities

seperate responsibilities

51
New cards

Why does the client and server have separate responsibilities

So changes doesn’t affect each other

52
New cards

What is server duties

Store the data, rules, and logic, and provide information (rep of resort Ed) in response to client requests

53
New cards

What is client duties

Makes requests to the server and does something useful with the response.

54
New cards

How does the client and server see each other

Black boxes

55
New cards

What does it mean when the client and server see each other as Black boxes

where each knows the API (the
interface) but not the internal implementation of the other

56
New cards

In some cases, what may the client learn

the client learn the API dynamically from the server

57
New cards

What benefit does this separation Between the client and server provide

Flexibility

58
New cards

What can different types of clients do with the same server

Interact

59
New cards

What comprises does the server have when changing how it stores or manage data

There’s no disadvantages it doesn’t affect the client

60
New cards

Will adding New components or services disrupt the system

No

61
New cards

IN rest, what does each request from the client include and what is done with that item

information the server needs to process it and respond

62
New cards

What memory does the server keep of the previous request or client session state

None

63
New cards

Why does the server doesn’t keep any memory of previous requests or client
session state

treats every request as independent

64
New cards

Why it’s better treating every request as independent

Easier to add more server to handle additional requests, which improves scalability

65
New cards

Imagine a product search: GET /products?type=book . The server might return only the first 10 results. What would we do if we want more.

We must include all the necessary information to get the next set such as
GET /products?type=book&start=25
GET /products?type=book&page=2
GET /products?type=book&limit=25&offset=25

66
New cards

What is the difference between non-restful system and restful system when handling servers

non-RESTful systems often rely on server-side session state. The server
remembers what the client was doing, allowing requests like:
GET /products?type=book
GET /nextPage
GET /nextPage

67
New cards

We have a non restful request,
GET /products?type=book
GET /nextPage
GET /nextPage
What rule does this violate?

Statelessness, server keeps track of the client’s progress

68
New cards

We have a non restful request,
GET /products?type=book
GET /nextPage
GET /nextPage
What would happen if it crashes and compare this to stateless system.

server crashes, the client may lose its session and have to start over. A stateless system, on the other hand, is more robust and scalable

69
New cards

Since each request contains all the information the server needs, how many requests can the server handle

Any

70
New cards

What would happen to stateless system if one server fail.

another can take over without interrupting the client’s interactions.

71
New cards

What does A REST server explicitly indicate

A response can be cached

72
New cards

How is cache headers done in REST

Using HTTP headers (Cache-Control or Expires)

73
New cards

If a response is cacheable, what can the server also specify

How long it’s remains valid

74
New cards

What happens when a client has a valid cached copy

it can reuse it instead of making a new
request

75
New cards

What are the benefits of reusing a valid cache copy

reduces network traffic and server load. Making the system more scalable
and efficient.

76
New cards

consider an image-hosting website. The server stores both images and metadata (e.g., filename, upload date, tags, or description). While metadata may change, the image files themselves usually do not.
How will the server can mark the images and metadata and what are the benefits of doing this.

Images as cacheable for longer periods, while metadata may have shorter cache times or no caching at all. Clients and intermediaries can reuse large, unchanging resources efficiently

77
New cards

What are the benefits of RESTful system using a uniforms interface for the API

predictable, easy to understand, and interoperable across different systems

78
New cards

What are the key aspects of RESTFUL system uniform interface

Identification of Resources, Manipulation of resources through representations, Self-descriptive message, HATEOAS

79
New cards

REST is centered around resources, which are any entities that can be named< what are some of those examples

images, user profiles, orders, or real-time data streams

80
New cards

How are resources created and how are they identified

dynamically generated by the server and uniquely identifiable by a URL that remains constant for its lifetime

81
New cards

Do urls represent nouns or verb?

Nouns

82
New cards

What happen if an API use verbs in the url such as /removeProduct or /updateProduct

Generally are not RESTFUL

83
New cards

In Rest what does the client interacts with the resource

The information, not the resource itself ir it storage mechanism

84
New cards

How is this information formatted in REST when the client interacts with the information and why

JSON and contains all the data needed to understand and work with it

85
New cards

What does the server handle in regards to Manipulation of resources through representations

The actual storage and management of the resource (e.g., by using a database, files, or even other servers)

86
New cards

Does the client need to know how it done when the server handles the storage and the management of the resource? And why?

No as this separation allows the server to
change its internal implementation without affecting the client

87
New cards

What does the client and server do after receiving the resource information

Display the product or let a user interact
with it. The server may later change its internal storage (e.g., move from a database to a file system), but the client still receives the same JSON format, so its code doesn’t break.

88
New cards

In a RESTful system, every request and response should contain enough of what

information to be understood on its own, without relying on previous messages.

89
New cards

In a RESTful system, every message should contain ____ type? And why

each message should contain a data type, which tells the receiver what kind of data it is receiving (e.g., "Content-Type" in HTTP).

90
New cards

Why should RESTFUL system follow the formal meaning of the HTTP verbs

Because these verbs have well-known meanings, clients and servers can interact consistently, which contributes to a uniform interface

91
New cards

What does HATEOAS stand for

Hypermedia As The Engine Of Application State

92
New cards

What does hypermedia links in the server response act in REST and why

Signpost. The client doesn’t need to “know” all URLs in advance; it can simply follow the links provided by the server

93
New cards

Where can the client start to discover and navigate other resources dynamically using hyperlinks?

An inital url

94
New cards

What are the benefits of HATEOAS approach in the client side

Explore relationship(e.g., how a product is linked to its reviews or manufacturer), discover related resources (e.g., similar products), and interact with the system without hardcoding any URLs.

95
New cards

What would be a example of HATEOAS for both client and sever side

a client requests the first page of products like this: GET /products
The server can respond with JSON including products and links:
{
"products": [
{ "id": 101,
"name": "Wireless Mouse",
"price": 29.99,
"links": {
"reviews": "/products/101/reviews"
,
"similar": "/products?category=accessories" }},
{ "id": 102,
"name": "Mechanical Keyboard",
"price": 79.99,
"links": {
"reviews": "/products/102/reviews",
"similar": "/products?category=keyboards" }}],
"links": {
"nextPage": "/products?start=10" }

96
New cards

From this server JSOn file, how would you see reviews for the mouse

{
"products": [
{ "id": 101,
"name": "Wireless Mouse",
"price": 29.99,
"links": {
"reviews": "/products/101/reviews"
,
"similar": "/products?category=accessories" }},
{ "id": 102,
"name": "Mechanical Keyboard",
"price": 79.99,
"links": {
"reviews": "/products/102/reviews",
"similar": "/products?category=keyboards" }}],
"links": {
"nextPage": "/products?start=10" }

To see reviews for the mouse, the client follows /products/101/reviews, to see similar products it follows /products?category=accessories, to see the next page of products it follows /products?start=10

97
New cards

For fully RESTful systems that implement HATEOAS, does the client hardcode url

No it discovers all actions dynamically through the links provided in the responses

98
New cards

Why don’t REST API fully use hypermedia content often

APIs still expect the client to know URLs in advance and don’t provide hypermedia links

99
New cards

For fully RESTful systems that implement HATEOAS, are they considered RESTful even if they use HTTP verbs and URL

No

100
New cards

In REST, the system can be composed of multiple layers of servers or services it the client interact with what as a whole

the system as a whole and never needs to know how many layers exist or how they are structured

Explore top flashcards

flashcards
EntreCulturas 1 Review Vocab
165
Updated 980d ago
0.0(0)
flashcards
English Unit 6 Vocab
20
Updated 1044d ago
0.0(0)
flashcards
LDA Final Jeopardy
26
Updated 1197d ago
0.0(0)
flashcards
Chapter 19 Vocabulary
20
Updated 37d ago
0.0(0)
flashcards
AP World Unit 2
30
Updated 159d ago
0.0(0)
flashcards
Greek and Latin List 3
20
Updated 910d ago
0.0(0)
flashcards
DCUSH semester 1
184
Updated 1192d ago
0.0(0)
flashcards
APUSH Terms 5.2
47
Updated 1168d ago
0.0(0)
flashcards
EntreCulturas 1 Review Vocab
165
Updated 980d ago
0.0(0)
flashcards
English Unit 6 Vocab
20
Updated 1044d ago
0.0(0)
flashcards
LDA Final Jeopardy
26
Updated 1197d ago
0.0(0)
flashcards
Chapter 19 Vocabulary
20
Updated 37d ago
0.0(0)
flashcards
AP World Unit 2
30
Updated 159d ago
0.0(0)
flashcards
Greek and Latin List 3
20
Updated 910d ago
0.0(0)
flashcards
DCUSH semester 1
184
Updated 1192d ago
0.0(0)
flashcards
APUSH Terms 5.2
47
Updated 1168d ago
0.0(0)