Abstract controller for a REST-based CRUD server
A common task for a REST server is to expose a CRUD (Create, Read, Update and Delete actions) interface for each of its entities.
For each entity, the server should be able to:
- return a list of entities;
- return a single entity given its ID;
- create a new entity
- update an existing entity
- delete an existing entity
Those tasks are the same for each entity, so I think it's better to create an abstract controller with all those basic tasks and then just use it to create each single entity-oriented controller.
Read full article from Abstract controller for a REST-based CRUD server
No comments:
Post a Comment