Last post Jun 03, 2010 07:24 AM by XIII
May 20, 2010 05:11 AM|gurunguns|LINK
Can anyone tell me in layman language , What is REST and why do we need REST services compare to normal web service or WCF?
May 20, 2010 07:49 AM|XIII|LINK
please start by reading this article:
May 21, 2010 08:06 PM|derianto|LINK
I assume what you mean by "normal" web services are web services using SOAP protocol (the default WCF service uses SOAP)? If you're pretty familiar with what a SOAP web service is like, these are a few differences with the REST paradigm and the SOAP/RPC
In fact REST is what everybody has been doing since the founding of the web. When you access this forum, your browser basically does a REST call: "GET /t/1560141.aspx", instead of doing some SOAP call "DisplayPage()" or something like that. So I think
the reason we need REST services is because this is how the founding fathers of HTTP wants HTTP to be used, because we want HTTP to be harnessed to its full potential, and because ... it's simple :)
I hope this helps,
May 21, 2010 10:50 PM|gurunguns|LINK
Thanks derianto, for the explanatory answer but now I am curious to know how we will consume these REST services as unlike SOAP webservice in which we simple call the method exposed but with REST services how the client will consume "GET /orders/142", "PUT
/orders/142"? Can you please provide any code example.
REST DDD WCF
May 22, 2010 01:37 AM|XIII|LINK
you can take a look at this example:
http://www.codeproject.com/KB/aspnet/WCF_JQUERY_ASMX.aspx#6. Or take a look at the last sample code in this article:
May 23, 2010 11:53 AM|derianto|LINK
Most REST web services today do not have the metadata equivalent for client proxy generation (like .wsdl file in SOAP web services). You consume a REST web service by making explicit HTTP calls.
Example call with HttpWebRequest:
Example call with WCF Rest Starter Kit's HttpClient:
Example AJAX call with JQuery:
Some REST web services also provide a proxy code that you can use out-of-the-box. e.g. Facebook proxy
Jun 03, 2010 06:56 AM|gurunguns|LINK
Actually I live in basic .Net world and these JASON, WPF, Silverlight are out of my scope currently. Though I know WCF some so when we create a REST service by this I mean we can access the service using the url (eg:
http://www.xyz.com/GetProductInfo/HP) that means for consuming the REST service we don't have to create a proxy class and call the service method thru the proxy object and then
pass the parameters. Please correct me if I am wrong. Because after looking into some example to REST service consumer as JSON,WPF I very much confused.
Moreover, generally bolgs have REST similar URL, I guess, like
http://sample.wordpress.com/2010/05/24/linq/, please again correct me if I am wrong??
Jun 03, 2010 07:24 AM|XIII|LINK