I’ve been reading several papers, articles and technical documents lately on this subject. And I’ve become incredibly annoyed by several authors talking about “SOA Services” vs “RESTful APIs” as if they are completely different things and in occasions that compete.
The fact is that SOA is an architectural style, a paradigm, which promotes the use of software modules referred to as services that interact in order to deliver larger software solutions. That said RESTful APIs represent an important contribution to this style of architecture but conceptually speaking, solutions that implement REST APIs provide a service, they have service consumers, and the core principles on which REST APIs services are built (i.e. statelessness, granularity, modularity, and others) and also the tools used seem pretty similar to what I would consider a SOA based solution.
Moreover using the term “SOA Services” to refer to XML/SOAP web services in my opinion is wrong. Although I admit that there is ambiguity when referring to web services that are defined using WSDLs, I don’t support this term. I rather use the term SOAP services. I’ve also heard the term “XML services” but who says that REST services can’t use XML (at least in the response)?
Service Oriented Architecture does not force the use of any particular technology; the complete opposite. As stated in the SOA Manifesto (http://www.soa-manifesto.org/) “SOA can be realized through a variety of technologies and standards”.
In fact, I see a lot of value in adopting WSDLs like document (like the evolving WADL) to define REST APIs and also use some of the WS-* standards to enhance RESTful services. A simple example is using WS-Security. This is a mature standard and instead of developers reinventing the wheel to address authentication and authorization concerns, WS-Security could be used to secure REST services. I do however see a lot of value in implementing RESTful services in support of mobile apps demands.
In my view, there is no such thing as RESTful APIs vs SOA Services (or whatever some people call them). In my view, when talking about SOA, there are different types of services that can be created in support of different business problems. The business doesn’t care if you use SOAP or REST so long that the solution provided delivers the expected value to the business….don’t forget that.