when i use GET to retrieve and show information only, and Create, Update, Delete using POST, will my web app be automatically RESTful?
views:
77answers:
3No, as the REST idea gives the following mappings:
GET - Retrieve
POST - Create
PUT - Update
DELETE - Destroy
2 of these html actions (PUT and DELETE) aren't normally supported by browsers so REST frameworks tend to use some fudging to allow them through browsers.
There's also a lot of design philosophy in creating a RESTful application, so it's not really possible to have something 'automatically' restful. There's a lot of discussion between some groups as to what REST actually entails as well.
It'll be closer, but not fully RESTful.
You need, more than anything else, to ensure that all the necessary state is being transferred through the URI representation. (That's why it's "representational state transfer.")
It's more common to use the other HTML methods for your operations.
No. REST has nothing to do with HTTP, it is protocol-independent. Using a protocol like HTTP correctly (except to get around places where its implementation is broken, like with the lack of PUT support etc) is necessary, but not sufficient to be RESTful.