Thursday, November 7, 2013

Why XML (Restful) over SOAP

Technology has no limit and growing very rapidly these days hundreds of alternatives and available to carryout a single task. Sometime we got confused while selecting the right one.

Obviously before selecting the technology we should be aware about our targeted client.  In this article I tried to provide a simple matrix to understand the scope of SOAP vs Restful (XML/Json). 

This type of matrix is informal format of DAR (Decision Analysis and Resolution). This matrix might help to decide where to use SOAP or XML in SOA based architecture or while providing the service reference to anyone. 



S.No.
Parameterize Methods for SOAP XML
PLAIN XML over REST
Preference
1.
SOAP message heavy transport cost
XML low transport cost comparatively because its Light weight then SOAP message
XML
2.
No XML parsing required
XML parsing will be required
SOAP
3.
Separate method will be required per transaction type otherwise the parameter list will be huge as we expect different parameters for different request type
Single method will be able to handle all
XML
4.
Only the SOAP Reach client will be able to implement it easily otherwise it will be difficult for the technology where SOAP client is not easy to implement
Easy to implement by everyone and vastly acceptable in heterogeneous environment. 
XML
5.
Low scalability as we define the parameters in advance, WSDL and Implementation guide need to be update
Highly Scalable and the parameters can be change at any point of time only the Implementation guide need to be update
XML
6.
Less flexibility  because the format of SOAP is tightly coupled and must know proper SOAP envelop structure and body with defined target
More flexible to allow consumer how they are preparing the message
XML
7.
Development is fast
Development efforts is little bit higher as compare to soap
SOAP

It is not ended here. anyone can share their point to make it more vast, appropriate and widely acceptable. Suggestions are welcome .. 

Happy learning .. :) 
 
Post a Comment