Notes‎ > ‎

REST vs CRUD

The gadget spec URL could not be found
The gadget spec URL could not be found
REST stands for REpresentational State Transfer

CRUD stands for Create, Read, Update, Delete

REST vs CRUD is resources vs pages, like object-oriented vs procedural programming

REST

http://en.wikipedia.org/wiki/Representational_State_Transfer

REST is object-oriented
A set of resources, each with private data and a public api
A set of core functions are common to each resource
Each resource can define additional functions
REST changes the url structure of your website, but your data organization remains the same

REST was started by Ray Fielding in 2000 in his doctoral dissertation

REST urls

http://www.soupsonline.com/recipes/1

Action depends on whether the request is a GET (show), DELETE or PUT (update)

CRUD

CRUD is action-oriented
Users visit a url or submit a form and the server responds with html, xml or json

CRUD urls

http://www.soupsonline.com/recipes/show/1

http://www.soupsonline.com/recipes/update/1

Comments