Wednesday, June 6, 2007

What are PUT and DELETE?

I heard REST from Philip. I read the tutorials of REST. So I assumed that I knew some basic stuff about it. But reading Philip's blog entry on Rest Resource made me question whether I do understand PUT and DELETE. Frankly, I don't. We all know that REST is all about resources and you only need four HTTP operations GET, POST, PUT and DELETE. GET and POST are very famous and popular. What are the deals with PUT and DELETE?

I taught myself by reading A Conversation with Elliotte Rusty Harold. A characteristic of PUT and DELETE is "idempotent". It means that you can PUT a thing many times without creating copies. Sames goes DELETE. Many times deletion won't cause loss of other resources. It is worthy to note that they both can be done using POST easily. So why bother to have them? I don't have a good answer now. Another interesting blog entry, "Why REST failed", was mentioned many times. I will write about it if it is interesting.

No comments: