ฝึกพูดภาษาอังกฤษด้วยเทคนิค Shadowing จากวิดีโอ: What Is REST API? Examples And How To Use It: Crash Course System Design #3

กำลังสร้างบทเรียน...
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

คำศัพท์และข้อสังเกตด้านการพูดสำหรับบทเรียนนี้

วิดีโอนี้มี 65 ประโยค และ 753 คำ สำหรับฝึกพูดตาม ช่วงที่มีเสียงพูดยาว 5:11 ผู้พูดพูดด้วยความเร็วสม่ำเสมอ ประมาณ 145 คำต่อนาที เหมาะกับการฝึกพูดตาม มีเพียง 78% ของคำที่อยู่ใน 3,000 คำที่ใช้บ่อยที่สุดในภาษาอังกฤษ คำศัพท์จึงค่อนข้างยาก

คำศัพท์สำคัญในวิดีโอนี้

คำที่ควรเรียนรู้ 15 คำจากวิดีโอ พร้อมคำอ่านและความหมาย:

คำศัพท์คำอ่านความหมาย
resource คำนาม/ɹɪˈzɔːs/ทรัพยากร
server คำนาม/ˈsɝvɚ/เซิร์ฟเวอร์
behave คำกริยา/bɪˈheɪv/ประพฤติ, ทำตัว
verb คำนาม/vɝb/คำกริยา, กริยา
compare คำกริยา/kəmˈpɛɚ/เปรียบเทียบ
custom คำนาม/ˈkʌstəm/แบบแผน, ธรรมเนียม
introduce คำกริยา/ˌɪntɹəˈdus/แนะนำ
identical คำคุณศัพท์/ɪˈdɛntɪkl̩/เดียวกัน
incorrect คำคุณศัพท์/ˌɪn.kəˈɹɛkt/ผิด
specify คำกริยา/ˈspɛs.əˌfaɪ/ระบุ
attribute คำนาม/ˈæt.ɹɪˌbjut/คุณลักษณะ, คุณสมบัติ
newsletter คำนาม/ˈn(j)uzˌlɛtɚ/จดหมายข่าว
noun คำนาม/naʊn/นาม, คำนาม
syntax คำนาม/ˈsɪn.tæks/วากยสัมพันธ์
acronym คำนาม/ˈækɹənɪm/รัสพจน์

การออกเสียงที่ควรระวัง

ผู้พูดใช้รูปย่อและรูปลดเสียง 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, behave เป็นพิเศษ

เทคนิค Shadowing คืออะไร?

Shadowing เป็นเทคนิคการเรียนรู้ภาษาที่ได้รับการรับรองทางวิทยาศาสตร์ พัฒนาขึ้นสำหรับการฝึกนักแปลมืออาชีพ วิธีการนี้เรียบง่ายแต่ทรงพลัง: คุณฟังเสียงภาษาอังกฤษจากเจ้าของภาษาและพูดตามทันที — เหมือนเงาที่ตามผู้พูดด้วยช่วงเวลาห่าง 1-2 วินาที การวิจัยแสดงว่าเทคนิคนี้ปรับปรุงความแม่นยำในการออกเสียง ทำนองเสียง จังหวะ การเชื่อมเสียง การฟังเข้าใจ และความคล่องแคล่วในการพูดได้อย่างมีนัยสำคัญ

เทคนิค shadowing: อ่านคู่มือฉบับเต็มทีละขั้นตอน →