跟讀練習: What Is REST API? Examples And How To Use It: Crash Course System Design #3 - 通過影片學習英語口語

選擇練習模式

每種模式都會開啟全屏練習室。

65 句
如果句子過短或過長,請點選 Edit 進行調整。
1
REST is the most common communication standard between computers over the internet.
2
What is it?
3
Why is it so popular?
4
Let's take a look.
5
API stands for Application Programming Interface.
6
It is a way for two computers to talk to each other.
7
The common API standard used by most mobile and web applications to talk to the servers is called REST.
8
It stands for Representational State Transfer.
9
It is a mouthful.
10
What does that mean?
11
REST is not a specification.
12
It is a loose set of rules that has been the common standard for building web APIs since the early 2000s.
13
An API that follows the REST standard is called a RESTful API.
14
Some real-life examples are Twilio, Stripe, and Google Maps.
15
Let's look at the basics of REST.
16
A RESTful API organizes resources into a set of unique URIs or Uniform Resource Identifiers.
17
The URIs differentiate different types of resources on a server.
18
Here are some examples.
19
The resources should be grouped by noun and not verb.
20
An API to get all products should be slash products and not slash get all products.
21
A client interacts with a resource by making a request to the endpoint for the resource over HTTP.
22
The request has a very specific format as shown here.
23
The line contains a URI for the resource we'd like to access.
24
The URI is preceded by an XGTP verb, which tells the server what we want to do with the resource.
25
A POST request means we want to create a new resource.
26
A GET means we want to read the data about an existing resource.
27
A PUT is for updating an existing resource.
28
A DELETE is for removing an existing resource.
29
You might have heard the acronym CRUD.
30
This is what it stands for.
31
In the body of these requests, there could be an optional HTTP request body that contains a custom payload of data, usually encoded in JSON.
32
The server receives the request, processes it, and formats a result into a response.
33
The first line of the response contains the HTTP status code to tell the client what happened to the request.
34
A well implemented RESTful API returns proper HTTP status codes.
35
The 200 level codes mean the request was successful.
36
The 400 level codes mean something was wrong with our request.
37
For example, the request contained incorrect syntax.
38
At the 500 level, it means something ran wrong at the server level.
39
For example, the service was unavailable.
40
A well-behaved client could choose to retry a fail request with a 500 level status quo.
41
We said could choose to retry because some actions are not idempotent and those require extra care when retrying.
42
When an API is idempotent, making multiple identical requests has the same effect as making a single request.
43
This is usually not the case for a post request to create a new resource.
44
The response body is optional and could contain the data payload and is usually formatted in JSON.
45
There's a critical attribute of REST that is worth discussing more.
46
A REST implementation should be stateless.
47
It means the two parties don't need to store any information about each other, and every request and response is independent from all others.
48
This leads to web applications that are easy to scale and well-behaved.
49
There are two final points to discuss to round out a well-behaved RESTful API.
50
If an API endpoint returns a huge amount of data, use pagination.
51
A common pagination scheme uses limit and offset as parameters.
52
Here is an example.
53
If they are not specified, the server should assume sensible default values.
54
Lastly, versioning of an API is very important.
55
allows an implementation to provide backward compatibility so that if we introduce breaking changes from one version to another,
56
consumers can get enough time to move to the next version.
57
There are many ways to version an API.
58
The most straightforward is to prefix the version before the resource on the URI.
59
For instance, like this.
60
Restful API is simple and effective when applied sensibly.
61
It may not be the best choice for all companies, but it is simple and good enough, and that's why it is so widely used.
62
There are other popular API options like GraphQL and GRPC.
63
We'll discuss those and compare them in separate videos.
64
If you would like to learn more about system design, check out our books and weekly newsletter.
65
Please subscribe if you learned something new thank you so much and we'll see you next time

下載應用

流利口語所需的一切

AI 發音評分逐句打分
音標練習掌握每個音
詞彙學習建立你的詞庫
詞彙遊戲邊玩邊學

同頻道

FOR YOU

推薦影片

本課的詞彙與口語要點

這段影片共有 65 個句子、753 個單詞可供跟讀。 講話部分時長為 5:11。 說話人語速平穩,每分鐘約 145 個詞,很適合跟讀。 只有 78% 的單詞屬於英語最常用的 3,000 詞,詞彙難度較高。

影片中的重點詞彙

影片中 15 個值得學習的單詞,附發音和釋義:

單詞發音釋義
resource 名詞/ɹɪˈzɔːs/資源 /資源
server 名詞/ˈsɝvɚ/伺服器 /伺服器, 伺服器
format 名詞/ˈfɔːɹ.mæt/格式, 開本 /開本
behave 動詞/bɪˈheɪv/為人 /為人
implementation 名詞/ˌɪmplɪmənˈteɪʃən/履行
verb 名詞/vɝb/動詞 /動詞
compare 動詞/kəmˈpɛɚ/比, 比較 /比較
custom 名詞/ˈkʌstəm/習慣 /習慣, 習俗 /習俗
introduce 動詞/ˌɪntɹəˈdus/介紹 /介紹, 紹介 /紹介
default 名詞/dɪˈfɔlt/違約 /違約, 暴雷
identical 形容詞/ɪˈdɛntɪkl̩/相同, 同一
implement 動詞/ˈɪmpləmənt/實施 /實施, 執行 /執行
interact 動詞/ɪn.təˈɹækt/互動 /互動
subscribe 動詞/səbˈskɹaɪb/簽署 /簽署
offset 名詞/ˈɔf.sɛt/補償, 抵銷

影片中出現的短語動詞

單詞釋義
check out 動詞退房

需要注意的發音

說話人用了 4 次縮略和弱讀形式,例如 we'll, don't, we'd。請按聽到的簡短形式來說。

  • “sh” 和 “zh” 音: implementation /ˌɪmplɪmənˈteɪʃən/, optional /ˈɑp.ʃə.nəl/, differentiate /dɪf.əˈɹɛn.ʃi.eɪt/, pagination /ˌpæd͡ʒəˈneɪʃən/
  • 長單詞——注意重音位置: implementation /ˌɪmplɪmənˈteɪʃən/, unavailable /ˌʌnəˈveɪləbəl/, differentiate /dɪf.əˈɹɛn.ʃi.eɪt/, compatibility /kəmˌpætəˈbɪlɪti/, parameter /pəˈɹæm.ə.tɚ/

如何用這段影片練習

  1. 先完整聽一遍影片,不要開口,記下不認識的單詞。
  2. 用正常速度逐句跟讀,每句重複到你的節奏與說話人一致為止。
  3. 錄下自己的聲音並與原聲對比,特別注意 resource, server, format 這類單詞。

什麼是跟讀法?

跟讀法 (Shadowing) 是一種有科學依據的語言學習技巧,最初開發用於專業口譯員的培訓,並由多語言者Alexander Arguelles博士普及。這個方法簡單而強大:您在聽英語母語原聲的同時立即大聲重複——就像是一個延遲1-2秒緊跟說話者的影子。與被動聽力或語法練習不同,跟讀法強迫您的大腦和口腔肌肉同時處理並模模擬實的講話模式。研究表明它能顯著提高發音準確性,語調,節奏,連讀,聽力理解和口語流利度——使其成為雅思口語備考和真實英語交流最有效的方法之一。

影子跟讀法: 閱讀完整分步指南 →