Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REST and web services - having trouble understanding them

Well, the title more or less says it all. I sort of understand what REST is - the use of existing HTTP procedures (POST, GET, etc.) to facilitate the creation/use of web services. I'm more confused on what defines what a web service is and how REST is actually used to make/expose a service.

For example, Twitter, from what I've read, is RESTful. What does that actually mean? How are the HTTP procedures invoked? When I write a tweet, how is REST involved, and how is it any different than simply using a server side language and storing that text data in a database or file?

like image 932
Major Productions Avatar asked Jul 25 '10 18:07

Major Productions


2 Answers

This concept is also a bit vague to me but after looking at your question I decided to clarify it a bit more for myself.

please refer to this link in msdn and this.

Basically it seems that it is about using http methods (Get/Post/Delete) to identify the exposure of resources the application allows. For example: Say you have the URL :

http://Mysite.com/Videos/21 

where 21 is an id of a video. We can further define what methods are allowed to this url - GET for retrieval of the resource, POST for updating/ Creating, Delete for deleting.

Generally, it seems like an organized and clean way to expose your application resources and the operations that are supported on them with the use of http methods

like image 154
sTodorov Avatar answered Oct 26 '22 18:10

sTodorov


You may want to start with this excellent introductionary writeup. It covers it all, from start to end.

like image 25
berkes Avatar answered Oct 26 '22 19:10

berkes