Web Services v1 Constitution
Web API over WCF
ITAS Web Services are Web API rather than WCF as we consider Web API better approach in this situation because:
-
The Web API framework makes it easy to build HTTP web services that reach a broad range of clients.
-
REST support.
-
Web API supports a wider range of media types.
-
Uses basic protocol and formats such as HTTP, WebSockets, SSL, JQuery, JSON, and XML.
-
Support for auto generated HTML Help pages.
-
Open source & available as an independent download.
While Hivedome are not discounting the use of WCF services in the future, the ability to provide clients with inline help, to use REST and the ability to expose these services via http were thought to be more advantageous to most of our clients than the advantages brought by WCF; which include the use of TCP protocol, binary encoding and SOAP.
REST over SOAP
The decision to use Web API was partially determined by the fact that Web API use RESTful services and WCF, SOAP.
RESTful services have the following benefits:
-
A stateless client/server protocol - usually means that all the information necessary to understand the request is contained in the HTTP message.
-
A set of well-defined operations that apply to all pieces of information (resources) - the main ones are GET, POST, PUT, and DELETE.
-
A universal syntax for resource-identification - basically means that each resource has its own unique URI (or URL).
-
The use of hypermedia both for application information and application state-transitions - using HTML and XML as the primary file type that carries the content.
The key to the differences between the two techniques is that REST relies on a simple set of “verbs” and puts all complexity into “nouns” that specify the resource. SOAP, on the other hand, allows for a complex set of XML-formatted commands and data transmission options. A REST-style request does not care what procedure is run; it just asks for a named resource.
SOAP/REST usage patterns
The final part of the technology decision was based on uptake, this is important for two reasons:
-
The greater uptake of a specific technology over another, suggests professionals with this skillset would be easier for our clients to resource.
-
The greater the uptake of a specific technology type in a particular field.
Amazon have reported an 80:20 split in consumption of REST vs SOAP services. Many commerce Websites are making REST interfaces available for their various Web services today, including Amazon, Yahoo, eBay, Google and Facebook.
In conclusion
SOAP has a more elaborate complex of standardization efforts and open source toolkits. SOAP is also used to publish Web service with a WSDL or if security functions such as message signing and encryption are needed. However, because information and functionality needs to be exposed via a simple interface using minimal processor power, REST was determined to be the preferred method.