Re: REST and DELETE?
Mike Kelly <[email protected]>
| Newsgroups | gmane.comp.web.services.rest |
|---|---|
| Message-ID | <CANqiZJaw04aTejyrxchHERb3p9Ms7Q1C3h6tfg63+5uDiTPaPQ@mail.gmail.com> |
On Thu, Aug 9, 2012 at 10:58 AM, Erik Wilde <[email protected]> wrote: > hello. > > > On 2012-08-09 11:52 , Mike Kelly wrote: >> >> On Thu, Aug 9, 2012 at 10:41 AM, Dan Haywood >> <[email protected] <mailto:[email protected]>> >> wrote: >> On the second of those posts Stefan Tilkov made (what I thought was) >> a very pertinent comment: >> /I think this is a specific case of the general scenario where >> >> resources are coupled behind the scenes. If they're part of the same >> "service", that's fine; if they're not, it violates the idea of >> loose coupling./ >> /In other words: If I define cart and order processing as being part >> >> of the same application or service, I can use the approach you >> criticize. If I aim to design them so they're independent, your >> alternative is better./ >> >> I thought that was pretty insightful. >> Absolutely, key is that this is a design consideration rather than a >> violation of any constraint. > > > in theory, that's true. in practice, most people see no problem saying their > cart is /cart/42 and that orders go to /cart/42/order and have no indication > in the request that the order is about /cart/42. then when they want to > switch to a different ordering mechanism, they break things, because they > did not understand the implicit coupling between /cart/42/order and > /cart/42/. my general strategy therefore is to strongly encourage designers > to not couple things this way, because the advantages are minimal, and the > potential problems substantial. > Agreed, thanks for clarifying! Cheers, M