REST versus SOAP – Why Now?
The REST vs SOAP topic has been covered before, but the increased emphasis on REST in WCF and inclusion of the ASP.NET Web API in ASP.NET MVC 4 clearly demonstrates an increased focus from Microsoft, who is typically more enterprise minded than other REST standard bearers. Additionally, the upcoming release of Windows 8 with the strategically aligned changes to Windows Azure are going to require IT in the Enterprise to bring REST into their toolbox.
The Rise of REST
Although Representational State Transfer (REST) and SOAP (formerly Simple Object Access Protocol) have both been around for over a decade each – the proliferation of web enabled personal devices has increased the value and utility of REST. Previously, REST had been adopted as an architectural model for web services in support of AJAX, and as part of consumer level API’s (for example Amazon or PayPal), without much attention given within the enterprise, and particularly not as a contender for making up any part of the Service Oriented Architecture (SOA).
REST for the Enterprise
Many enterprises struggle with the notion of SOA as anything more than their collection of web services. Often, these web services merely represent a layer through which the client achieves access to the database. In these enterprises, particularly those in which “client” more often than not indicates a browser, REST should be the favored architectural style for web services due to the simplicity. The simplicity of REST is not restricted to the message contents (which tend to be smaller that SOAP messages when using a content type other than XML). REST also promotes a Resource Oriented Architecture as described in RESTful Web Services (O’Reilly) by Leonard Richardson and Sam Ruby, which embraces the resource based nature of the web, and can also help procedural minded developers start thinking in a new way (this mindset can be carried forward to the design of message oriented services in a SOAP environment). RESTful web services also tend to be more flexible in terms of their content due to the lack of an explicit contract, which can be quite useful in development (though potentially less useful
Resource Oriented Architecture at Work
Resource Oriented Architecture can certainly be a new way of thinking.