Rest vs soap Web Services

Source: Internet
Author: User
Tags representational state transfer

Http://www.petefreitag.com/item/431.cfm

I am seeing a lot of new Web services are implemented usingRestStyle 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 standsRepresentational 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 havene' 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 cocould 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.

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.