Beyond REST and RPC

RPC (SOAP a.o.) is procedural thinking. Resources in REST on the other hand are objects. Designing a REST-API lets you think in objects. So far: everything is OK. BUT: by using the same (uniform) interface everywhere, REST reduces objects to (anaemic) data and promotes data-centric thinking.

Object thinking is about thinking in behavioural objects. It is the behaviour that makes the difference between the objects. That is why you first start defining the interface when discovering objects. If all objects have the same interface, the "uniform interface" in REST, then the only difference between them is their properies, their state.

CRUD is a typical data-centric interface. Of course it works. So does a Turing Machine or directly programming in Assembler. It is "Turing complete": you can program anything in it. But that doesn't imply the paradigm cannot be improved. What would happen if we would think in objects without a uniform interface? Behaviourally rich resources...

I'm looking for a synthesis (in the sense of Fichte & Hegel's Dialectic) between RPC and REST.

(december 2012)


Related inspiration:



February 2014

Interesting discussion:!topic/dddinphp/0SIRm90dIFI

Mathias proposes to use Command objects as resources to communicate via REST with richer domain behaviour.