REST vs SOAP

Johannes Ernst posted an interesting comparison of REST vs SOAP (via: James Governor). He makes an excellent point that SOAP URIs point at the type, rather than an instance, of a service. I do not think that the fact that there will be more REST URIs means that this space is more innovative. I am not sure that the number of URIs is, in any way, correlated with innovation. Neither model seems to inherently limit innovation based on URIs, creating a new URI is free and there is an infinite supply (I suppose those two are related) regardless of how you are going to use it.

I think that there will be more innovation in REST architectures because they are more easily understood. REST architectures are easier to understand because they are goal oriented. To use Johannes’ example, the accountant using the system does not want to “calculate this week’s payroll taxes”. She want to know how much this week’s payroll taxes are. If finding that out involves the system calculating it that is fine but the calculation is an implementation detail. The “this weeks payroll taxes” URI is cleaner because it describes the goal rather than the way we achieve that goal this week.

This seems reasonably obvious at the macro level, no thinks that humans should be making SOAP call from their browsers. I think that it makes just as much sense at lower levels. Interfaces, boundaries and encapsulation are for human consumption (the computer would be just as happy without those things) so it makes sense to design those interfaces in a way that is easy for humans to grasp. The data is usually much easier to grasp that the processes using the data. We have know this for year, Frederick Brooks pointed it out in The Mythical Man Month with this statement, “Show me your flow charts and conceal your tables and I shall continue to be mystified, show me your tables and I won’t usually need your flow charts; they’ll be obvious.”

Dan Ingalls said, “If a system is to serve the creative spirit, it must be entirely comprehensible to a single individual.” REST architectures will be more innovative because they can be understood by most single individuals.