REST (Representational State Transfer)
REST is a standard for designing networked applications. It uses HTTP methods to implement the concept of CRUD (Create, Read, Update, Delete).
When to use REST:
- Public APIs for third-party developers : REST is widely adopted and understood by many developers, making it a good choice for public APIs.
- Microservices with HTTP/JSON : If your microservices are lightweight and primarily use HTTP/JSON, REST can be a good choice.
- Stateless operations : REST is stateless, meaning each HTTP request happens in complete isolation. When the client makes an HTTP request, it includes all information necessary for the server to fulfill that request.
- Cacheable data : If your application serves data that can be cached to improve performance, REST can be a good choice because HTTP supports caching out of the box.
- Web applications : REST is a good fit for web applications, especially when combined with JavaScript frameworks like Angular or Reac