- Building RESTful Web Services with PHP 7
- Haafiz Waheed ud din Ahmad
- 254字
- 2021-07-03 00:02:15
Resource identification
Resources will be identified in requests. For example, a resource in a web-based REST system will be identified by the URI. And no matter how a resource is stored on the server, it will remain separate from what will be returned to the client in the response.
In fact, resource storage on the server is an implementation but the request and response is what a client is interacting with, so it is like an interface to the client. And a client can identify a resource by this interface. So all that a client knows is what it is requesting and getting in response.
For example, a client usually sends a request to the URI and gets a response in the form of HTML, JSON, or XML. None of these formats are how the server stores data internally in the database or somewhere else on the server. But for a client, it is the URI where it will hit and the HTML, JSON, and XML is what it gets.
This is what a resource is for a client, no matter how it is stored on the server. And this is the benefit, because no matter if the server's internal logic or representation is changed, for the client it will remain the same because the client sends the request to the URI and gets a response in the form of HTML, JSON, or XML and not how it is stored on the server. This constraint, results in loose coupling of resource identification and representation.
- Getting Started with ResearchKit
- 計算機圖形學編程(使用OpenGL和C++)(第2版)
- Java游戲服務器架構(gòu)實戰(zhàn)
- 微信公眾平臺開發(fā):從零基礎到ThinkPHP5高性能框架實踐
- Reactive Android Programming
- 快人一步:系統(tǒng)性能提高之道
- Getting Started with Hazelcast(Second Edition)
- 零基礎學Kotlin之Android項目開發(fā)實戰(zhàn)
- 編程可以很簡單
- Java并發(fā)編程之美
- Python Machine Learning Blueprints:Intuitive data projects you can relate to
- Vue.js光速入門及企業(yè)項目開發(fā)實戰(zhàn)
- 網(wǎng)頁設計與制作
- C++標準庫(第2版)
- Python編程基礎與數(shù)據(jù)分析