Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REST without PUT [closed]

The ThoughtWorks Technology Radar July 2014 mentions under Techniques / Trial a new trend called REST without PUT. They explain it as:

In the last radar we talked about Capturing Explicit Domain Events, putting emphasis on recording the business-meaningful events that have triggered state transitions instead of just CRUD’ing entities. REST interfaces commonly use PUT to update resource state, however it’s often better to POST to record a new event resource which captures intent. REST without PUT has a side-benefit of separating command and query interfaces and forces consumers to allow for eventual consistency.

Are there any additional resources where one can read about this? Is the term REST without PUT an idea made up by ThoughtWorks, or is this something academic, or …?

Any hints on this?

like image 866
Golo Roden Avatar asked Oct 29 '14 08:10

Golo Roden


2 Answers

IMHO they are saying about that one should stop looking behind on CRUD operations and focus on state-transitions. Then you map set of transitions to specific events. One of them is used to update entity. How it would be updated and what would be updated is decided on context of event. One need to POST event of updating instead of PUT update.

BTW that solves one problem with using pure HTML in REST - HTML doesn't allow to trigger PUT or DELETE without JavaScript.

like image 183
nikita Avatar answered Oct 16 '22 15:10

nikita


REST without PUT isn't standard; as you guessed, this is just ThoughtWorks thing.

like image 28
Pankaj Jangid Avatar answered Oct 16 '22 15:10

Pankaj Jangid