Re: [Specifications] Add Use Case: Creating events indirectly (ie. with PUT)

Review status: 0 of 1 files reviewed at latest revision, 15 unresolved discussions.

---

*[drafts/use-cases/5.1.creating-new-event-indirectly.md, line 34 at r1](https://reviewable.io:443/reviews/hydracg/specifications/143#-KxZXSL5Owpv1cqTG5AR:-Kxde9f-Yh3GnqqGlO6z:b-bmpdzo) ([raw file](https://github.com/hydracg/specifications/blob/f03e3028e6417adf2767a44c0c854b4af3b5fb4d/drafts/use-cases/5.1.creating-new-event-indirectly.md#L34)):*
<details><summary><i>Previously, tpluscode (Tomasz Pluskiewicz) wrote…</i></summary><blockquote>

Well, it would only traverse the representation. Not go over the wire and dereference resources.

But your point is still valid, but, what would you propose as alternative?
</blockquote></details>

If client doesn't use anywhere proposed by you `http://example.com/vocab/createEvent` why even bother with introducing it? If you would just like to traverse all links, you could just use `rdfs:seeAlso` and it would give you the same result. IMO if you would like to introduce in the example `http://example.com/vocab/createEvent` client should use it, I would prefer something generic like `hydra:add` (or 'hydra:memberTemplate`)  but still client would have to make use of it when finding intended operation.

---

*[drafts/use-cases/5.1.creating-new-event-indirectly.md, line 64 at r1](https://reviewable.io:443/reviews/hydracg/specifications/143#-KxYcL7VkgLlvZsRJlA4:-KxdfIWUganLX79B-M8G:b-cf1o18) ([raw file](https://github.com/hydracg/specifications/blob/f03e3028e6417adf2767a44c0c854b4af3b5fb4d/drafts/use-cases/5.1.creating-new-event-indirectly.md#L64)):*
<details><summary><i>Previously, tpluscode (Tomasz Pluskiewicz) wrote…</i></summary><blockquote>

`hydra:memberTemplate` almost works but again, the object of this property doesn't have to be an `IriTemplate` at all.

@elf-pavlik here's an example:

1. You register on a website
1. The server creates a private profile for you, say, `/user/some-guid`
1. You get a link to `/user/{public-user-name}` (or `/user/some-guid/public` if it wasn't to be a template)
1. You `PUT` to that resource to create a publicly visible profile resource

So you link to a resource which doesn't initially exist and it's not part of any collection. But the general structure of your hypermedia is the same. I think that Stack Overflow follows a similar pattern.
</blockquote></details>

In your example we don't have a collection where we want to create a member resource. I can't really think of situation where for collection we would have a resource and not a template for purpose of creating new members. If one wanted to use POST, would most likely use IRI of the collection, for PUT we need a template otherwise it wouldn't make sense for creating new members.

---

*[drafts/use-cases/5.1.creating-new-event-indirectly.md, line 72 at r1](https://reviewable.io:443/reviews/hydracg/specifications/143#-KxchCDgCDQQ4nzkMnf4:-KxdgXAW-bH9rd-_ue25:b-f3n4fy) ([raw file](https://github.com/hydracg/specifications/blob/f03e3028e6417adf2767a44c0c854b4af3b5fb4d/drafts/use-cases/5.1.creating-new-event-indirectly.md#L72)):*
<details><summary><i>Previously, tpluscode (Tomasz Pluskiewicz) wrote…</i></summary><blockquote>

Of course, my bad.

And what if `property` was removed from a template mapping? Is that legal?
</blockquote></details>

I think we shouldn't require `property` from `mapping` of `IriTemplate`. Still we may want to provide data type somehow, also I would see a need later to inform client that it shoudl generate universal identifier UUID, CUID etc.

---

*[drafts/use-cases/5.1.creating-new-event-indirectly.md, line 97 at r1](https://reviewable.io:443/reviews/hydracg/specifications/143#-KxciNXcDOyiU5-EUn3l:-Kxdhx5y153J2or3yUxm:b1rlqpk) ([raw file](https://github.com/hydracg/specifications/blob/f03e3028e6417adf2767a44c0c854b4af3b5fb4d/drafts/use-cases/5.1.creating-new-event-indirectly.md#L97)):*
<details><summary><i>Previously, tpluscode (Tomasz Pluskiewicz) wrote…</i></summary><blockquote>

I actually copied this from UC5 and probably similar in other use cases. Let's discuss separately? @alien-mcl?
</blockquote></details>

I think we can make and Issue for that since UC5  also has it and don't block this PR if it doesn't introduce that issue

---


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


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

Received on Sunday, 29 October 2017 20:00:38 UTC