WebAPI is the technology by which you can expose data over HTTP following REST principles.
|
WCF SOAP
|
WEB API
|
Size
|
Heavyweight because
of complicated WSDL structure.
|
Light weight, only
the necessary information is transferred.
|
Protocol
|
Independent of
protocols.
|
Only for HTTP
protocol
|
Formats
|
To parse SOAP
message, client needs to understand WSDL format.
|
Output of WebAPI is
simple string messages, JSON, simple XML format, etc. So writing parsing
logic for that is very easy.
|
Principles
|
SOAP follows WS-*
specification.
|
WebAPI follows REST
principles. (Please refer to REST in WCF chapter.)
|
WCF and WebAPI also can implement REST, why WebAPI
WCF was brought into implement SOA, the intention was never to implement REST. WebAPI is built from scratch and the only goal is to create HTTP services using REST. Due to the one point focus for creating REST service, WebAPI is more preferred.
No comments:
Post a Comment