Re: What can we agree on? (ISSUE-42)

Hi,

one remark about "current web apis" below


On February 25, 2015 6:57:18 AM Dietrich Schulten <ds@escalon.de> wrote:

> I agree.
>
>
> Am 23. Februar 2015 22:50:42 schrieb "Markus Lanthaler"
> <markus.lanthaler@gmx.net>:
>
> > I think we are starting to go in circles regarding ISSUE-42. Would everyone
> > agree with the following statements? Is there anything I forgot?
> >
> >
> > In Web APIs, we often need to return a lot of related data, e.g., persons
> > someone knows
> >
> > Sometimes it is too much data to be returned in a single response
> >
> > Therefore, we would like to split this data and return it in multiple
> > responses instead
> >
> > Nevertheless, the client needs to be able understand, that all these
> > responses are actually just partial views of a big "collection" (the persons
> > someone knows)
> >
> > Due to the way some vocabularies are defined, we can't link directly to such
> > "helper resources" as that would be misinterpreted by clients (a client
> > would misinterpret a helper resource to be a person if it would be linked to
> > via foaf:knows e.g.)
> >
> > We want the relationships to be explicitly expressed so that we don't have
> > to rely on a reasoner
> >
> > If JSON-LD is used as the serialization format, the documents should look as
> > idiomatic as possible. I.e., they should closely resemble current Web APIs.

This can mean many things of course. For me an important aspect is that 
hypermedia clients follow rels by executing http methods on the href 
associated with the rel.

In our case the attribute of a json-ld is the rel, the @id is the href. The 
rel says that the current document is related to another one in a 
well-defined way (e.g. next, prev, create-form [1], foaf:knows).

As it stands right now, that works very elegantly with PUT, PATCH or DELETE 
as long as a single item is updated or deleted.

However, when it comes to creating new items with POST or PUT, it turns out 
that we can't use the @id as elegantly.

The GET aspect made us go in circles already :-)

Maybe that sheds some more light to the discussion, or it makes more clear 
where I come from.

Best regards,
Dietrich


[1] https://tools.ietf.org/html/rfc6861





> >
> >
> >
> > --
> > Markus Lanthaler
> > @markuslanthaler
> >
> >
> >
> >
>
>
>

Received on Wednesday, 25 February 2015 07:48:08 UTC