pf » REST vs SOAP Web Services

REST vs SOAP Web Services

web

I am seeing a lot of new web services are implemented using a REST style architecture these days rather than a SOAP one. Lets step back a second and explain what REST is.

What is a REST Web Service

The acronym REST stands for Representational State Transfer, this basically means that each unique URL is a representation of some object. You can get the contents of that object using an HTTP GET, to delete it, you then might use a POST, PUT, or DELETE to modify the object (in practice most of the services use a POST for this).

Who's using REST?

All of Yahoo's web services use REST, including Flickr, del.icio.us API uses it, pubsub, bloglines, technorati, and both eBay, and Amazon have web services for both REST and SOAP.

Who's using SOAP?

Google seams to be consistent in implementing their web services to use SOAP, with the exception of Blogger, which uses XML-RPC. You will find SOAP web services in lots of enterprise software as well.

REST vs SOAP

As you may have noticed the companies I mentioned that are using REST api's haven't been around for very long, and their apis came out this year mostly. So REST is definitely the trendy way to create a web service, if creating web services could ever be trendy (lets face it you use soap to wash, and you rest when your tired). The main advantages of REST web services are:

  • Lightweight - not a lot of extra xml markup
  • Human Readable Results
  • Easy to build - no toolkits required

SOAP also has some advantages:

  • Easy to consume - sometimes
  • Rigid - type checking, adheres to a contract
  • Development tools

For consuming web services, its sometimes a toss up between which is easier. For instance Google's AdWords web service is really hard to consume (in CF anyways), it uses SOAP headers, and a number of other things that make it kind of difficult. On the converse, Amazon's REST web service can sometimes be tricky to parse because it can be highly nested, and the result schema can vary quite a bit based on what you search for.

Which ever architecture you choose make sure its easy for developers to access it, and well documented.



Related Entries
17 people found this page useful, what do you think?

Trackback Address: 431/FC2234D360457253E51737A5E3DB9B23
On 08/03/2005 at 11:58:50 AM MDT Patrick wrote:
1
I think in your REST vs SOAP section you meant that the first list was advantages of REST, not SOAP. Otherwise, great overview of the two technologies.

I would add as an advantage of REST, though, that it's built "closer" conceptually to existing technologies, so in my experience it's more hackable in the sense of combining disparate parts together in innovative ways.

On 08/03/2005 at 12:01:34 PM MDT Ken Kolano wrote:
2
Do you mean to say... "The main advantages of REST web services are:"?

On 08/03/2005 at 12:38:08 PM MDT Pete Freitag wrote:
3
Patrick, and Ken - yes I meant to say REST not SOAP. I have edited the entry. Thanks!

On 08/03/2005 at 12:40:17 PM MDT Pete Freitag wrote:
4
I don't want to edit this entry again, but I should have mentioned PayPal as another big user for SOAP, their new web services use SOAP.

On 07/21/2006 at 9:18:06 AM MDT Luis wrote:
5
Is there an example of an implementation of a web service using cf7 using rest. I can't seem to find one. I need to expose a web service that will allow for HTTP POST AND GET for consuming.

Thanks -Luis

On 07/17/2007 at 1:49:40 AM MDT Rogelio Carrillo Jr. wrote:
6
I like much on the concept of REST, but can you list a URL that has sample web service implementation using REST.

On 10/17/2007 at 10:45:51 AM MDT Ben wrote:
7
Would anyone have a connection/s with any person practicing this technology in the MN twin cities area?

On 11/20/2007 at 8:28:13 AM MST JZ wrote:
8
I am an enterprise architect and soa-integration practitioner currently working in MN for a client's transformation from web 1.0 to web 2.0 in which a hybrid Rest Web Services and SOAP services are architectured in two front - web site activites (REST) and (SOAP) enterprise applications interation (EAI) to enterprise information integration (EII)

On 01/14/2008 at 8:19:31 PM MST imei wrote:
9
Where can I find tutorial or complete sample code to build REST WebServices in C#?

On 02/08/2008 at 8:02:21 PM MST Lahiru Gunathilake wrote:
10
I think no need to have a competition between REST and SOAP.If you use Apache Axis2c you can use both.When you see some service which is reliable with REST you can use REST and if you see any advantage with SOAP you can use SOAP.

On 04/04/2008 at 1:01:46 PM MST Craig Conover wrote:
11
Yes, this was a nice overview of the two Web Service types. If you are interested in creating AJAX applications (simple and fast) WaveMaker will consume either of them and are equally easy to wire up to your widgets visually.

On 04/28/2008 at 6:30:08 AM MDT sameh wrote:
12
i want an exaple how i make the hit to service in retrieving the response ...

On 05/02/2008 at 1:39:44 AM MDT KhurramS wrote:
13
Very good article without any focus on blaming one or the other.

On 05/10/2008 at 5:56:00 PM MDT mawandm wrote:
14
I've been using XML-RPC for quite sometime simply because its quite simple to use. Where would you place it vs REST vs SOAP




  



Spell Checker by Foundeo





Subscribe to my RSS Feed: solosub RSS
Tags