Placeholder Image

Subtitles section Play video

  • Connectivity is an amazing thing.

    連接是一件神奇的事情。

  • By now, we're all used to the instant connectivity that puts the world at our fingertips.

    現在,我們都已經習慣了即時連接,世界盡在指尖。

  • From desktops or devices, we can purchase, post, pin, and pick anything, anywhere.

    通過臺式電腦或設備,我們可以隨時隨地購買、張貼、釘釘和挑選任何東西。

  • We are connected to the world and each other like never before.

    我們與世界和彼此的聯繫前所未有。

  • But how does it happen?

    但它是如何發生的呢?

  • How does data get from here to there?

    數據如何從這裡到那裡?

  • How do different devices and applications connect with each other to allow us to place an order, make a reservation, or book a flight with just a few taps or clicks?

    不同的設備和應用程序如何相互連接,讓我們只需輕點幾下或點擊幾下就能下訂單、訂票或預訂班機?

  • The unsung hero of our connected world is the Application Programming Interface, or API.

    應用程序接口(API)是我們互聯世界中的無名英雄。

  • It's the engine under the hood and is behind the scenes that we take for granted, but it's what makes possible all the interactivity we've come to expect and rely upon.

    它是引擎蓋下的引擎,是我們認為理所當然的幕後黑手,但正是它讓我們所期待和依賴的所有互動成為可能。

  • But exactly what is an API?

    但究竟什麼是應用程序接口?

  • It's a question everyone asks.

    這是一個人人都會問的問題。

  • Okay, not really, but we're glad you did.

    好吧,不是真的,但我們很高興你這麼做了。

  • The textbook definition goes something like this.

    教科書上的定義是這樣的

  • In computer programming, an Application Programming Interface, API, is a set of routines, protocols, and tools for building software.

    在計算機編程中,應用程序接口(API)是一套用於構建軟件的例程、協議和工具。

  • An API expresses a software component in terms of its operations, inputs, outputs, and underlying types.

    應用程序接口用操作、輸入、輸出和底層類型來表達軟件組件。

  • Okay, to speak plainly, an API is the messenger that takes requests and tells a system what you want to do and then returns the response back to you.

    好吧,說白了,應用程序接口就是接收請求的信使,它告訴系統你想做什麼,然後把響應返回給你。

  • To give you a familiar example, think of an API as a waiter in a restaurant.

    舉個熟悉的例子,把應用程序接口想象成餐廳裡的服務員。

  • Imagine you're sitting at the table with a menu of choices to order from, and the kitchen is the part of the system which will prepare your order.

    想象一下,你坐在餐桌前,拿著菜單點菜,而廚房就是系統中為你準備點菜的部分。

  • What's missing is the critical link to communicate your order to the kitchen and deliver your food back to your table.

    缺少的是將您的訂單傳達給廚房並將食物送回餐桌的關鍵環節。

  • That's where the waiter, or API, comes in.

    這就是服務員或 API 的作用所在。

  • The waiter is the messenger that takes your request or order and tells the system, in this case, the kitchen, what to do, and then delivers the response back to you, in this case, food.

    服務員是一個信使,負責接收您的請求或訂單,並告訴系統(這裡指的是廚房)該怎麼做,然後將回應(這裡指的是食物)送回給您。

  • Now that we've whetted your appetite, let's apply this to a real API example.

    現在,我們已經吊起了你的胃口,讓我們把它應用到一個真實的 API 示例中。

  • You're probably familiar with the process of searching for airline flights online.

    您可能對在線搜索航空公司班機的過程並不陌生。

  • Just like at a restaurant, you have a menu of options to choose from, a drop-down menu in this case.

    就像在餐廳一樣,你有一個菜單供你選擇,這裡是一個下拉菜單。

  • You choose a departure city and date, a return city and date, cabin class, and other variables.

    您可以選擇出發城市和日期、返回城市和日期、艙等和其他變量。

  • In order to book your flight, you interact with the airline's website to access the airline's database to see if any seats are available on those dates and what the cost might be based on certain variables.

    為了預訂班機,您需要與航空公司的網站互動,訪問航空公司的數據庫,查看這些日期是否有空位,以及根據某些變量可能需要的費用。

  • But what if you're not using the airline's website, which has direct access to the information?

    但是,如果您沒有使用航空公司的網站,而該網站可以直接獲取信息呢?

  • What if you are using an online travel service that aggregates information from many different airlines?

    如果您使用的在線旅行服務彙總了許多不同航空公司的資訊,該怎麼辦?

  • The travel service interacts with the airline's API.

    旅行服務與航空公司的應用程序接口進行交互。

  • The API is the interface that, like your helpful waiter, can be asked by that online travel service to get information from the airline's system over the Internet to book seats, choose meal preferences, or baggage options.

    API 是一個界面,就像您的服務員一樣,在線旅行服務商可以要求它通過互聯網從航空公司的系統中獲取信息,以預訂座位、選擇用餐偏好或行李選項。

  • It also then takes the airline's response to your request and delivers it right back to the online travel service, which then shows it to you.

    然後,它還會將航空公司對您請求的回覆直接發回在線旅行服務,然後再顯示給您。

  • So now you can see that it's APIs that make it possible for us all to use travel sites.

    所以,現在你可以看到,正是應用程序接口讓我們所有人都能使用旅遊網站。

  • The same goes for all interactions between applications, data, and devices.

    應用程序、數據和設備之間的所有互動也是如此。

  • They all have APIs that allow computers to operate them, and that's what ultimately creates connectivity.

    它們都有應用程序接口(API),允許計算機對其進行操作,這就是最終建立連接的原因。

  • So whenever you think of an API, just think of it as your waiter running back and forth between applications, databases, and devices to deliver data and create the connectivity that puts the world at our fingertips.

    是以,每當您想到應用程序接口時,就把它想象成您在應用程序、數據庫和設備之間來回跑動的服務員,以提供數據並創建連接,讓世界觸手可及。

  • And whenever you think of creating an API, think MuleSoft.

    每當您想到創建 API 時,就會想到 MuleSoft。

Connectivity is an amazing thing.

連接是一件神奇的事情。

Subtitles and vocabulary

Click the word to look it up Click the word to find further inforamtion about it