- From: Dietrich Schulten <ds@escalon.de>
- Date: Sat, 18 Jun 2016 10:36:46 +0200
- To: Ruben Verborgh <ruben.verborgh@ugent.be>
- Cc: Hydra <public-hydra@w3.org>
- Message-ID: <f796badb-ddf9-4767-a6f4-6358c14351da@escalon.de>
Hi Ruben, Am 17.06.2016 18:13 schrieb Ruben Verborgh <ruben.verborgh@ugent.be>: > > Hi Dietrich, > > Interesting to have such a list! > > > 4. As a programmer, I want to use the client to POST to the API by > > giving it linked data to POST and a path of predicates which leads to a > > representation that has a POST hydra operation. > > > > 5. As a programmer, I want to use the client to PUT data to the API by > > giving it linked data to PUT (replace) and a path of predicates which > > leads to a representation that has a PUT hydra operation. > > > > 6. As a programmer, I want to use the client to PATCH (partial update) a > > resource by giving it a path of predicates which leads to a > > representation that has a PATCH hydra operation. (e.g. setting an > > :eventStatus to :EventCancelled) > > IMHO, the above 3 cases are to specific. > As a programmer, you don't want to POST; > you want to create a new resource or change an existing one. > > This might or might not happen with POST in the back, > but this should not be of your concern at the Hydra level. > > Ruben > The use case is written in terms of http because it is the most prevalent ReST protocol, I should have stated that in the assumptions. Basically, what I want to do is to transition to the next application state using an arc which requires some data in the request body. Hydra tells me which method to use for the transition, and which information the request body should contain. So actually I do not "want to POST" in the first place, but I want to be able to execute the method hydra is giving me - POST being just an example. Since CRUD is bad for ReST [1], I am pretty sure we should not abstract away the uniform interface methods as CRUD. Probably that is not what you want to do, but "create a new or change an existing resource" sounds a lot like CRUD :-) With the clarification above, are the user stories ok for you? Do you think it is a good idea to guide the client development by user stories? Best, Dietrich Am 17.06.2016 18:13 schrieb Ruben Verborgh <ruben.verborgh@ugent.be>: Hi Dietrich, Interesting to have such a list! > 4. As a programmer, I want to use the client to POST to the API by > giving it linked data to POST and a path of predicates which leads to a > representation that has a POST hydra operation. > > 5. As a programmer, I want to use the client to PUT data to the API by > giving it linked data to PUT (replace) and a path of predicates which > leads to a representation that has a PUT hydra operation. > > 6. As a programmer, I want to use the client to PATCH (partial update) a > resource by giving it a path of predicates which leads to a > representation that has a PATCH hydra operation. (e.g. setting an > :eventStatus to :EventCancelled) IMHO, the above 3 cases are to specific. As a programmer, you don't want to POST; you want to create a new resource or change an existing one. This might or might not happen with POST in the back, but this should not be of your concern at the Hydra level. Ruben
Received on Saturday, 18 June 2016 08:37:20 UTC