Re: [Specifications] Adding already existing resources as collection members

> The resulting collection resource available would be actually a view over sor:likes relations

I also like seeing those collections as views on the dataset, and as I commented in https://github.com/HydraCG/Specifications/issues/137#issuecomment-333602000 we may want to take in consideration `hydra:Collection` with `hydra:manages` together with [Triple Pattern Fragments](http://www.hydra-cg.com/spec/latest/triple-pattern-fragments/)

Mostly for that reason, currently I prefer LINK/UNLINK and PUT/DELETE new resource (a named graph) which just add desired triple to a dataset.
PATCH on the collection seems to not treat it as *view* similar to TPF, and in cases like Vimeo patching one collection and affecting the other one seems awkward - which one should I patch? Let's just try both!
As for PUT/DELETE vs LINK/UNLINK, I see some benefits in PUT/DELETE
1. Clients sends payload with content type supported by the server, doesn't have to use HTTP headers
2. Client can include a digital signature in the payload which some datasets might have as require

> This way client doesn't need to know anything about URL's and how to compose those as required in PUT. It still has all the PUT's benefits like idempodency.

I see it as another advantage over PATCH which HTTP doesn't define as idempotent.

The way I tend to see Hydra role here, it shouldn't impose any of the choices above but provide clear way for the service to advertise chosen approach and client should have ability to achieve intended goal no matter which choice the server made. Client would just look for action of type `act:Link` or `act:Unlink` and the action would provide all the information on how to perform an operation (eg. HTTP LINK/UNLINK), possibly even delegating this action to an operation on another resource (eg. HTTP PUT/DELETE)

-- 
GitHub Notification of comment by elf-pavlik
Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/134#issuecomment-334313934 using your GitHub account

Received on Wednesday, 4 October 2017 23:02:19 UTC