Re: [Specifications] use manages block to advertise type of collection members

<img class="emoji" title=":lgtm:" alt=":lgtm:" align="absmiddle" src="https://reviewable.io/lgtm.png" height="20" width="61"/>

---

Reviewed 6 of 7 files at r1, 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 3 unresolved discussions.

---

*[drafts/use-cases/0.intro.md, line 89 at r2](https://reviewable.io:443/reviews/hydracg/specifications/132#-KrWt32Z1UxZkNXLNAXm:-KrWt32Z1UxZkNXLNAXn:b-34p1cg) ([raw file](https://github.com/hydracg/specifications/blob/8c2db652e54f3e4ed52b855e05c73330d9d2d2ea/drafts/use-cases/0.intro.md#L89)):*
> ```Markdown
>             "@type": "@id"
>         },
>         "collection": {
> ```

I don't remember whether we introduced the rule afterwards but I think we agreed to not have terms that differ only in their capitalization. Maybe we should revisit this at some point.

---

*[drafts/use-cases/1.1.security-considerations.md, line 18 at r2](https://reviewable.io:443/reviews/hydracg/specifications/132#-KrUSFWcxbytETQ1yIEc:-KrWsVf6OgC7QhJKd0CE:b-w4vzmo) ([raw file](https://github.com/hydracg/specifications/blob/8c2db652e54f3e4ed52b855e05c73330d9d2d2ea/drafts/use-cases/1.1.security-considerations.md#L18)):*
<details><summary><i>Previously, tpluscode (Tomasz Pluskiewicz) wrote…</i></summary><blockquote>

What I mean is that replacing the API-specific term loses the link type between one resource (the Entrypoint) and the other (List of events). I think that the link relation trumps the manages block, so to speak.

As for the client though, a way to discover collection of a given type may be useful. How would you like it to be based on `"@type": "hydra:Collection"` and the `manages`-block and not the predicate type? This way you can keep a more informative link predicate
</blockquote></details>

If such a relation exists, then yes, it should be used. This is for cases where no such relations exists yet and would only be created for the sake of being able to connect some entity with a collection.

---

*[drafts/use-cases/5.creating-new-event.md, line 29 at r1](https://reviewable.io:443/reviews/hydracg/specifications/132#-KrT4ZeUK43qWAnpOI76:-KrWuLX8hQk-9dIPPX_r:b66h8pw) ([raw file](https://github.com/hydracg/specifications/blob/7a85c04e5cbfa0958d3ffd64bb3fafbb423a1361/drafts/use-cases/5.creating-new-event.md#L29)):*
<details><summary><i>Previously, tpluscode (Tomasz Pluskiewicz) wrote…</i></summary><blockquote>

Not really what I had in mind but you are right. I meant more of what I wrote in the other comment about losing the link type. 

In the end though I still don't entirely understand why you'd want a `getCollection` method instead of `getLink`. The former assumes what's on the other side. Not really hypermedia-y.
</blockquote></details>

Think of it as a specialized link relation that Hydra clients understand natively. This is similar to how browsers use the `icon` or `stylesheet` link relation. You could also have multiple `manages` blocks that describe the relationship between the referencing entity and the collection members in more detail. See the [page on the wiki](https://www.w3.org/community/hydra/wiki/Avoid_that_collections_break_relationships) where we worked on this (here's the [summary](https://www.w3.org/community/hydra/wiki/Collection_Design)).

---


*Comments from [Reviewable](https://reviewable.io:443/reviews/hydracg/specifications/132#-:-KrWvSMfkGGOJuTvC48e:bnfp4nl)*
<!-- Sent from Reviewable.io -->


-- 
GitHub Notification of comment by lanthaler
Please view or discuss this issue at https://github.com/HydraCG/Specifications/pull/132#issuecomment-322264541 using your GitHub account

Received on Monday, 14 August 2017 18:07:35 UTC