- Python API Development Fundamentals
- Jack Chan Ray Chung Jack Huang
- 265字
- 2021-06-11 12:56:23
RESTful API
REST stands for Representational State Transfer. It was first defined in Dr. Roy Fielding's dissertation (Architectural Styles and the Design of Network-Based Software Architectures) back in 2000. This dissertation is considered to be the bible in the web domain. REST is not a standard or protocol; it is more like a software architectural style. Many engineers follow this architectural style to build their applications, such as eBay, Facebook, and Google Maps. These web applications serve huge amounts of traffic every second, so you can see that REST really is a scalable architecture style. And when we say RESTful API, we are referring to an API that conforms to the REST constraints/principles.
REST Constraints/Principles
There are five important constraints/principles for the REST architecture style:
- Client-server: There is an interface between the client and the server. The client and server communicate through this interface and are independent of each other. Either side can be replaced as long as the interface stays the same. Requests always come from the client-side.
- Stateless: There is no concept of state for a request. Every request is considered to be independent and complete. There is no dependence on the previous request nor dependence on a session to maintain the connection status.
- Cacheable: Things are cacheable on the server or client-side to improve performance.
- Layered system: There can be multiple layers in the system, and the goal here is to hide the actual logic/resources. These layers can perform different functions, such as caching and encryption.
- Uniform interface: The interface stays the same. This helps to decouple the client and server logic.
- Building Django 2.0 Web Applications
- 工業(yè)控制網(wǎng)絡(luò)安全技術(shù)與實踐
- NB-IoT物聯(lián)網(wǎng)技術(shù)解析與案例詳解
- 企業(yè)網(wǎng)絡(luò)安全管理
- VMware NSX網(wǎng)絡(luò)虛擬化入門
- 人人都該都懂的互聯(lián)網(wǎng)思維
- Hands-On Microservices with Node.js
- 轉(zhuǎn)化:提升網(wǎng)站流量和轉(zhuǎn)化率的技巧
- 一本書讀懂TCP/IP
- 物聯(lián)網(wǎng)基礎(chǔ)及應(yīng)用
- 網(wǎng)絡(luò)安全之道
- 計算機通信網(wǎng)絡(luò)安全
- 工業(yè)以太網(wǎng)技術(shù):AFDX/TTE網(wǎng)絡(luò)原理、接口、互連與安全
- 從物聯(lián)到萬聯(lián):Node.js與樹莓派萬維物聯(lián)網(wǎng)構(gòu)建實戰(zhàn)
- 物聯(lián)網(wǎng)與智慧廣電