Saturday, October 19, 2013

SOAP vs REST

My take on REST vs SOAP

REST
  • REST can be consumed by any client, web browser with ajax and javascript
  • REST is lightweight
    • No XML parsing required
    • Has less bandwidth, SOAP headers are heavy payload
  • HTTP GET operations are safe in REST
  • REST are mostly stateless 
  • Good for web services, light weight no xml parsing systems
  • Exposes data over internet
 SOAP

  • SOAP is more like a RPC, where REST is not
  • SOAP / WSDL  can be used to generate client side code unlike REST where HTTP code has to be developed
  • SOAP can be asynchronous in nature, REST are http based and need asynchronous implementation
  • HTTP/HTTPS layer  need not be developed like REST
  • REST have no contract - prone to go wrong in integration of systems
  • SOAP have contract - can be discovered easily
  • Good for enterprise services - system integrations
  • Asynchronous processing
  • Stateful with contract to systems

No comments:

Post a Comment

bee-social