Representational State Transfer (REST) is an architecture style that exposes data and functionality using Uniform Resource Identifiers (URIs). It is independent of protocol or message format. Most web applications use RESTful web services over HTTP using JSON as the message format. The RESTful web services over HTTP use the following convention when mapping CRUD operations to HTTP methods:
CRUD operation |
HTTP method |
---|---|
Create |
|
Read |
|
Update |
|
Delete |
|
The RESTful web services are used in modern single page applications because they decouple the services from the user experience logic. They are also performant, lightweight, scalable, stateless, and maintainable.
The products grid application uses the RESTful web services to perform CRUD operations on the products. It exposes the following services:
Service description |
HTTP method |
URI |
Message format |
---|---|---|---|
Add a product |
|
|
JSON |
Retrieve all products |
|
|