- Hands-On RESTful Web Services with Go
- Naren Yellavula
- 290字
- 2021-06-24 17:04:22
Characteristics of REST services
These are the main properties that make REST simple and unique compared to its predecessors:
- Client-server based architecture: This architecture is most essential for the modern web to communicate over HTTP. A single client-server may look naive initially, but many hybrid architectures are evolving. We will discuss more of these shortly.
- Stateless: This is the most important characteristic of a REST service. A REST HTTP request consists of all the data needed by the server to understand and return the response. Once a request is served, the server doesn't remember whether the request arrived after a while. So, the operation will be a stateless one.
- Cacheable: In order to scale an application well, we need to cache certain responses. REST services can be cached for better throughput.
- Representation of resources: The REST API provides the uniform interface to talk to. It uses a Uniform Resource Identifier (URI) to map the resources (data). It also has the advantage of requesting a specific data
- Implementation freedom: REST is just a mechanism to define your web services. It is an architectural style that can be implemented in multiple ways. Because of this flexibility, you can create REST services in the way you wish to. As long as it follows the principles of REST, you have the freedom to choose the platform or technology for your server.
Thoughtful caching is essential for REST services to scale.
We have seen the types of web services and understood what is REST API. We also looked at the characteristics that make REST services unique. In the next section, we will take a look at REST verbs and status code and cover a few examples of path parameters.
推薦閱讀
- HornetQ Messaging Developer’s Guide
- ASP.NET Web API:Build RESTful web applications and services on the .NET framework
- jQuery Mobile Web Development Essentials(Third Edition)
- Learning ArcGIS Pro 2
- Java虛擬機(jī)字節(jié)碼:從入門到實(shí)戰(zhàn)
- Java Web程序設(shè)計(jì)任務(wù)教程
- 零基礎(chǔ)入門學(xué)習(xí)Python(第2版)
- Mastering Linux Security and Hardening
- Android開(kāi)發(fā)三劍客:UML、模式與測(cè)試
- 搞定J2EE:Struts+Spring+Hibernate整合詳解與典型案例
- 深入理解C指針
- Advanced Python Programming
- 超簡(jiǎn)單:Photoshop+JavaScript+Python智能修圖與圖像自動(dòng)化處理
- Angular Design Patterns
- 從零開(kāi)始學(xué)Unity游戲開(kāi)發(fā):場(chǎng)景+角色+腳本+交互+體驗(yàn)+效果+發(fā)布