DEV Community

Robert Morschel
Robert Morschel

Posted on

From Chaos To REST

In the beginning there was chaos, and the enterprise was dark, null and void. Poor software developers struggled in vain to build systems with inadequate tools and tightly-coupled remote procedural calls over clunky and incompatible binary protocols. But then there was light, and seeing the error of their ways, the developers moved to XML-based RPC over the ubiquitous HTTP protocol. Some hapless souls stumbled over remaining pools of dark, filled with SOAP, which used to be called simple, but then not, since it clearly wasn’t. Others were lured in to gloomy caves by evil product vendors, where they were locked into dungeons of proprietary extensions, never to be seen again. However, the fittest survived, and reached Level 0, and they saw that it was good.

Then, one day, realising that remote communication is best done using coarser-grained payloads, not itsy little bits of data fragments that meant more frequent network calls, they moved towards a document style of programming. They had unwittingly reached Level 1, and they saw that it was good.

However, soon it became apparent that their myriad document-oriented RPC calls could be distilled down to four basic operations: Create, Read, Update or Delete, and some academic bloke called Fielding observed that CRUD was just like POST, GET, UPDATE and DELETE, and documents just representations of underlying things called resources, that the web had been doing this for ages, and he called it REST. Our intrepid software developers had stumbled upon Level 2, and they saw that it was good.

Then they rested.

However, some malcontents clamoured that it was too early to rest, and that the world needed Fielding’s multiple resource representations. So a few intrepid dabblers set off, generating XML and JSON representations of their resources, but soon decided that this was pointless since JSON was anyway the coolest representation ever.

The developers rested once again.

Then one day, a man came from the wilderness, a wild, woolly-headed man bearing a placard on which was written the word HATEOAS.

“Repent of your ways”, he cried. And lo, some followed him, listening intently as he taught them about Hypertext As The Engine Of Application State, that resources should link to each other, and that links should be resource identifiers in their own right, and that this was the Web Way.

But the others still rested.

And the wild, woolly man got fed up, burnt his loin cloth in disgust, and left, muttering something about CORBA.

Top comments (3)

Collapse
 
humzakhan profile image
Humza K.

Dont stop writing, EVER.

Collapse
 
peter profile image
Peter Kim Frank

Robert, this is such a fun and creative article. I can't wait for Exodus :)

Collapse
 
rmorschel profile image
Robert Morschel

Thank you. Now you have me pondering. :)