RESTful Services versus SOAP or XML-RPC

The purpose of this blog posting is a quick review, for myself, on the differences and the advantages and disadvantages of RESTful services versus SOAP or XML-RPC. When is it appropriate to be using RESTful services? When is it appropriate to use SOAP? Well, if you are consuming web services, the answer is pretty simple: Use whichever is appropriate for the service being published. You don’t really have much of a choice in that situation.
The next two circumstances deserve a little more attention. First, when you are both producer and consumer of the webservice, and second, when you are the producer of the webservice for one or more outside entities, possibly the public. Now, which do you use? Well, here’s the basic rundown on each, for comparison’s sake.

REST (REpresentational State Transfer) – ie. the object is represented by the URL

1) On the plus side, it is SIMPLE, and so requires less handholding for outside entities to make use of it, and it does not require any special tools.
2) It is lightweight, so less code is required, typically, and smaller data transfers (less XML overhead)
3) The results are human readable, in most cases.
-) On the downside, it is not supported by Apache Axis 1.4, which is the version used in ColdFusion 7.

SOAP (Simple Object Access Protocol) or XML-RPC (Remote Procedure Calls):
1) It can be simple, if you have the right tools.
2) It is strongly typed and explicit, essentially establishing a contract between the client code and the service provider.

The REST approach was embraced by David H. and is highlighted in his keynotes on Ruby on Rails. The virtues of REST are touted by Dave Thomas, the Pragmatic Programmer, and others. It tends to be the favored approach for developers in Ruby on Rails, PHP, and a signature prescription for a Web 2.0 style web application.

SOAP is more “old school”, and tends to be the favored approach by Java developers.

A new driver for the SOAP versus REST pro-con discussion is the widespread emergence of mobile phones with internet capability. The assumptions about connections and bandwidth usually assigned to desktop computers do not necessarily apply to mobile phones. So, the lower overhead of a RESTful approach does contribute to the argument for using REST rather than SOAP.

Both sides have good arguments behind their use. In general, though, the trend is moving away from SOAP and XML-RPC toward the more RESTful approach, largely due to the successes it has brought sites that use REST. In an culture where there is a strong sentiment toward SOAP, likely the case in an old Java shop, it may not be the battle that you wish to engage in.

Advertisements

7 Responses to RESTful Services versus SOAP or XML-RPC

  1. Sherina says:

    Just dropping by.Btw, you website have great content!

    ______________________________
    Instantly Search Millions of Public Records & Resources

  2. Rino 530HCx says:

    Rino 530HCx…

    […]RESTful Services versus SOAP or XML-RPC « Delayed Instantiation[…]…

  3. This will get rid of the built up odours and
    leave everything clean and smelling fresh. You can put
    a dehumidifier to keep the moisture out of the air so it will not affect your things
    and your home. Clean your gloves with lukewarm water and squeeze out the excess water.

  4. Thanks for finally writing about >RESTful Services versus SOAP or XML-RPC | Delayed Instantiation <Liked it!

  5. Basically, everywhere where there are lots of people or items that need to be cooled
    can benefit from one of the portable air conditioning units available.

    While some maintenance can be done by a homeowner, a good plumber or HVAC technician should be consulted
    to make sure that your heating system will run efficiently during the next winter season and for years to
    come. It is critical to consider the features of your product.

  6. Edward says:

    You will need to determine if it is the humidity and sweating that you are suffering from, as this can be relatively easy to fix.
    That’s where desiccant dehumidification comes into the picture. Clean your gloves with lukewarm water and squeeze out the excess water.

  7. When I initially commented I clicked the “Notify me when new comments are added” checkbox and now each
    time a comment is added I get several emails with the same comment.
    Is there any way you can remove people from that service?
    Many thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: