What is REST?
The REST stands for REpresentational State Transfer
➢ State means data
➢ REpresentational means formats (such as XML, JSON, YAML, HTML, etc)
➢ Transfer means carry data between consumer and provider using the HTTP protocol
Key points about REST - REpresentational State Transfer:
• REST was originally coined by Roy Fielding, who was also the inventor of the HTTP protocol.
• A REST API is an intermediary Application Programming Interface that enables two applications to communicate with each other over HTTP, much like how servers communicate to browsers.
• The REST architectural style has quickly become very popular over the world for designing and architecting applications that can communicate.
• The need for REST APIs increased a lot with the drastic increase of mobile devices. It became logical to build REST APIs and let the web and mobile clients consume the API instead of developing separate applications.
REST – Architecture
REST Architectural Constraints
An API that has the following constraints is known as RESTful API:
Client-server architecture: The client is the front-end and the server is the backend of the service. It is important to note that both of these entities are independent of each other.
Stateless: No data should be stored on the server during the processing of the requested transfer. The state of the session should be saved at the client’s end.
Cacheable: The client should have the ability to store responses in a cache. This greatly improves the performance of the API.
Uniform Interface: This constraint indicates a generic interface to manage all the interactions between the client and server in a unified way, which simplifies and decouples the architecture.
Layered System: The server can have multiple layers for implementation. This layered architecture helps to improve scalability by enabling load balancing.
Code on Demand: This constraint is optional. This constraint indicates that the functionality of the client applications can be extended at runtime by allowing a code download from the server and executing the code.
What is Resource?
What is URI?
What is Sub-resource?
Important HTTP Methods
Important HTTP Status codes
게시물 도메인
댓글 도메인
로그인 로그아웃
This REST API design is going to help us whenever we actually develop the rest APIs.
Ths is a typical standard most organizations use to create a REST API design for resources.
Spring Starter Project
유데미에서
Building Real - Time Rest APIs with Spring Boot 강의를 들으며 정리를 할 예정입니다.
'Back-end > Spring Boot + REST API' 카테고리의 다른 글
Spring boot - blog application (REST API) : Comment (0) | 2022.07.03 |
---|---|
Spring boot - blog application (REST API) : Pagination and Sorting Support (0) | 2022.06.30 |
Spring boot - blog application (REST API) : Post CRUD (0) | 2022.06.29 |
Spring Boot 컨트롤러에서 데이터 받는 방법(@RequestBody, @RequestParam, @PathVariable) (0) | 2022.06.27 |
SpringBoot 개념정리 (0) | 2022.06.22 |
댓글