WS-* does not imply strict typing
The SOAP/WSDL/WS-* SOA view of the world is like a statically typed programming language, i.e. C++ or Java — everything is pre-defined, contracts govern everything, nobody can interact without following formal rules … and ideally, everything violating the rules (and policies) will get caught before even going into production.
RESTful HTTP is like a dynamic programming language (i.e. Smalltalk, Ruby, Python, etc.) — you’ll only find out at runtime whether things actually work together, and might well run into errors that would have been caught by a rigorous (and strict) rule-checking process up front; but on the other hand, you have a much more dynamic system, where you can add and remove and change stuff on the fly, and even have some means to react to errors dynamically.
Just like Dan, would not say that WS-* is more strictly typed than REST. I like REST, but in a way I find REST more restrictive than SOAP (Only five operations, what’s that all about?). As I’ve written in my WS-DuckTyping post, there are ways to deal with WS-* in a more flexible way.
What I do see is that REST is adopted by the same people who like scripting languages. In that aspect, REST and Ruby on Rails are in one camp, while SOAP and Java/.NET are in the other.
I guess it all comes down to the coolness factor: if you want to be cool, do REST and RoR; if you want to make money, do WS-* and Java.
May 7th, 2007 at 8:28
Uh, I can name two examples that does not follow your ‘cool’ and ‘money’ descriptors:
Amazon (money making giant) does REST. Google (icon of coolness) does SOAP.
See: http://www.xmlhack.com/read.php?item=1615
I the point your making, but big companies are also going the REST way. Not for connecting business systems, but for the information systems on the outside. If you want to make an API available for the critical mass, do it with REST. It is simple and fast to develop with.
SOAP is not simple, and it will not be used by the average programmer. SOAP does have a standards body (WS-*), it looks more mature, it is widely advocated to business people and will therefore be used by (large) companies.
So: SOAP for the inside communication and B2B, REST for outside communication and B2C.
May 7th, 2007 at 11:46
@Daan,
I fail to see what is so hard about SOAP itself. It’s just a bit of XML, wrapped in a body and envelope. If you have your abstractions right, you don’t even care whether you’re doing SOAP or Plain Old XML (POX). WS-* is what makes the SOAP space so hard. But luckily, the WS-* specs are optional, so you don’t have to use them.
In that respect, I find REST much harder, because you have to know a lot about the HTTP space to use it (Caching & ETags, GET vs. PUT vs POST, etc). Before you know it, you have put a non-safe operation under a GET, and Google changes the state of your service by indexing it.
As for the last paragraph in my blog: I think it’s actually a quote from Stefan Tilkov, the author of the quoted post. It was meant as a joke.
May 8th, 2007 at 8:14
Hi Arjen,
If you want your SOAP web services to be used by the world, you need to know WSDL, XML Schema, WS-*. And you are never sure if other SOAP web service clients work with your SOAP stack, because everyone interprets the standards a bit different. The WS-* standards are overwhelming and confusing. Joe Average does not know that you do not need WS-* to do SOAP. In the normal world, standards are mandatory. There is too much that you need to know before you can get started.
REST makes more use of the advantages of the HTTP protocol (caching, scalability), while in SOAP you have to do this yourself. REST looks a lot simpler. There are not a lot of rules and when there are rules, they are not as confusing. You posted originally: ‘Only five operations, what’s that all about?’ That is the simplicity of REST
This is why I think REST appeals more to Joe Average.
If large companies make interfaces available to ‘the public’, I think in the future this will happen more in the REST way, instead of in SOAP. Because REST will likely be used more by ‘the public’.
This will not happen for the ESB’s (at least I think
) for the reasons in my first comment.
To have a fun read: http://wanderingbarque.com/nonintersecting/2006/11/15/the-s-stands-for-simple/