The Counterintuitive Web
There are plenty of practical examples of applying REST to “enterprise” scenarios throughout REST in Practice, and lots of code samples. But above all the detail, three big ideas emerged. These form the basis of what I call the counterintuitive web:
- On the Web, clients guarantee the integrity of a sequence of actions. Mainstream SOA and its enterprise integration forebears make services and middleware responsible for the integrity of a sequence of actions. The Web succeeds at scale because it farms these responsibilities out to its client base.
- Resources are best thought of in terms of what they do, rather than what they are. That way, we don’t simply CRUD on entities. In a hypermedia system, resources adapt server-based capabilities so that hypermedia clients (i.e., clients that use HTTP’s uniform interface to drive an application forwards) can consume them.
- There are domain application protocols everywhere – it’s just that many of them are so trivial we don’t notice them or care to inspect them in any detail. CRUD is a protocol, but a relatively uninteresting one. Sometimes it’s worth understanding the underlying domain application protocol; sometimes you just need the uniform interface.
All pretty abstract points, perhaps – but you’ll see what I mean if you read the book.