Re: Why the collection?

Hello Markus.

Thanks for your reply.

What is context-specific about them?

Would you argue that lists (think rdf:List) are context-specific as well?


No, rdf:List doesn't look as context-specific nor nearly as powerful as
hydra:Collection.

That's the thing, you need such a concept to realize even the simplest
> APIs. I think it would be a huge mistake to leave the design of such a
> building block as "an exercise for the reader".


I've been specifically asked to implement LD collections so as to make
them as similar as possible to plain JSON arrays. The greater the
difference from [...], the bigger problem I have. I do realise that this
might
not be a common constraint but it's one I'm dealing with atm (and one that
leads to simpler representations, which I personally prefer). Hydra's
design
seems to be getting further and further away from that.

I am slowly coming up with an alternative design using ranges instead of
pages, though, and it's hitting "close enough" to the expected result.
I started out way off-track (this stuff feels like rocket science, every
now
and then) but I'm getting there.

My considerations come from the fact that I'm already able to describe the
supported operations of an instance of this design of mine using Hydra's
current vocab, as proven by the fact that I've had a non-dev teammate add
a new item to it using the Hydra Console. Now, I'm not saying that the
current collection design is wrong. On the very contrary, I'd be ready to
bet
that it's a lot better than mine. However, I just can't use it because my
specific context mandates simpler, more immediate representations.
I also get the feeling that I'm not the only one in this situation.

So, I partially agree with the fact that Hydra should not leave too much to
the reader. I do also think, however, that hydra:Collection is actually too
close to the other side of the spectrum.

IMHO, of course.




--

Jacopo Scazzosi
Developer
http://www.jacoscaz.com

On Mon, Mar 9, 2015 at 10:18 PM, Markus Lanthaler <markus.lanthaler@gmx.net>
wrote:

> On 6 Mrz 2015 at 19:48, Tomasz Pluskiewicz wrote:
> > On 2015-03-06 12:32, Jacopo Scazzosi wrote:
> >> Also, if the goal is to "describe Web APIs" from a practical,
> >> what-can-you-do-with-this point of view, then wouldn't Hydra benefit
> >> from the separation of concerns obtained by delegating the semantics of
> >> collections to dedicated vocabs?
> >
> > These is exactly what I have been trying to say some time last month. I
> > think that we are going into specific design of a collection. My point
> > was similar, that any kind of collection (or partial view) could be
> > modeled with simple building blocks like Operations and Links.
>
> That's what we are trying to do, aren't we? We try to define a couple of
> link relation types (= properties). What alternative design do you have in
> mind? Could you please sketch it with a simple example?
>
>
> > Any specialized terms sometimes seem a little out of place in a
> > general-purpose hypermedia vocabulary I think Hydra is.
>
> IMO, collections are the most basic data structure that is used in almost
> every Web API. Unfortunately, RDF (the data model) doesn't handle them very
> well natively so we need a construct to address those shortcomings in Hydra.
>
>
> >> I'm absolutely no expert but collections seem to be so context-specific
> >> that even you guys are experiencing some difficulties in finding a
> common
> >> ground - hence my considerations.
>
> What is context-specific about them? Would you argue that lists (think
> rdf:List) are context-specific as well?
>
>
> > On the other hand non-linked hypermedia approaches all sport some notion
> > of a collection, though I would very much draw any conclusion from that
> > simple fact.
>
> That's the thing, you need such a concept to realize even the simplest
> APIs. I think it would be a huge mistake to leave the design of such a
> building block as "an exercise for the reader".
>
>
> Cheers,
> Markus
>
>
> --
> Markus Lanthaler
> @markuslanthaler
>
>
>
>
>

Received on Monday, 9 March 2015 23:14:08 UTC