Re: [apps-discuss] NEW RELATION: property and context

"Markus Lanthaler" <markus.lanthaler@gmx.net> Fri, 31 May 2013 23:32 UTC

Return-Path: <markus.lanthaler@gmx.net>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4F1A221F8F2F for <apps-discuss@ietfa.amsl.com>; Fri, 31 May 2013 16:32:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.45
X-Spam-Level: *
X-Spam-Status: No, score=1.45 tagged_above=-999 required=5 tests=[BAYES_50=0.001, MSGID_MULTIPLE_AT=1.449]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3ftiMg6digVx for <apps-discuss@ietfa.amsl.com>; Fri, 31 May 2013 16:31:58 -0700 (PDT)
Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by ietfa.amsl.com (Postfix) with ESMTP id 5F50421F83EF for <apps-discuss@ietf.org>; Fri, 31 May 2013 16:31:06 -0700 (PDT)
Received: from mailout-de.gmx.net ([10.1.76.2]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0Laq3S-1TyTS43Ski-00kMsF for <apps-discuss@ietf.org>; Sat, 01 Jun 2013 01:31:04 +0200
Received: (qmail invoked by alias); 31 May 2013 23:31:04 -0000
Received: from 84-115-182-43.dynamic.surfer.at (EHLO Vostro3500) [84.115.182.43] by mail.gmx.net (mp002) with SMTP; 01 Jun 2013 01:31:04 +0200
X-Authenticated: #419883
X-Provags-ID: V01U2FsdGVkX1+80OxM9yO8aF8e0tDv6iPQqWOoF8IsUTWsO30zCI fERiGL8kWoO/uI
From: Markus Lanthaler <markus.lanthaler@gmx.net>
To: 'Ioseb Dzmanashvili' <ioseb.dzmanashvili@gmail.com>
References: <4038B5FE76874C54A819A07FE192AEF8@gmail.com> <CABP7Rbd815stpCPLL5q9eVuxbHDW6NbGrBPdfjJbSywKFRRJ4g@mail.gmail.com> <51a53d34.48b40e0a.70fc.1549SMTPIN_ADDED_BROKEN@mx.google.com> <CABP7RbfbicAaXOpy8r3w-YVmLjM=APLDjhTohUgGnqAfkHm0dA@mail.gmail.com> <51a54dfa.086f0e0a.693f.2ff4SMTPIN_ADDED_BROKEN@mx.google.com> <FEB564CAAF9B47B8BE41F0BBE8556650@gmail.com> <51a64b5f.87000e0a.78ef.ffff87a2SMTPIN_ADDED_BROKEN@mx.google.com> <87194C5A218E42F9AA9B81339D2C1BC5@gmail.com>
In-Reply-To: <87194C5A218E42F9AA9B81339D2C1BC5@gmail.com>
Date: Sat, 01 Jun 2013 01:30:59 +0200
Message-ID: <024601ce5e56$ea9206c0$bfb61440$@lanthaler>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: Ac5cqClz0wCu4GdXQIGfoKm6iAefrgBqi6Rw
Content-Language: de
X-Y-GMX-Trusted: 0
Cc: 'IETF Apps Discuss' <apps-discuss@ietf.org>, link-relations@ietf.org
Subject: Re: [apps-discuss] NEW RELATION: property and context
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 31 May 2013 23:32:03 -0000

On Wednesday, May 29, 2013 10:08 PM, Ioseb Dzmanashvili wrote:
> > This is right at the heart of my first question: How does the client
> know to fetch /article/photo;prop1 instead of /article/photo;prop2?
> >
> > There are only two options here: a) code against the target URL or b)
> > code against the title attribute. Since you said b) is used exclusively
> > for rendering purposes I assume you would code your client against the
> > URL (or parts thereof) which would go against the fundamental idea of
> > typed links.
>
> Both options are wrong.
> 
> > a) code against the target URL or
> 
> 1) the "property" link relation is enough to indicate that target
> resource is a property and allow agents to distinguish these links form
> others;

Yes, distinguish from other rels, but not enough to distinguish two properties as in your example:

*** RESPONSE: Photo representation ***
 HTTP/1.1 200 OK
 Content-Type: image/jpeg
 Content-Length: ...
 Link: </article/photo;prop1>; rel="property"; title="Property 1",
       </article/photo;prop2>; rel="property"; title="Property 2",


> 2) additional semantics can be provided with extension link relations
> and there is nothing wrong with it, it doesn't violate anything nor can
> be considered as anti pattern.

Right, but the question I ask myself then is why you need the generic "property" relation then.


> 3) your argument implicitly claims that there exists only M2M
> interaction which is also wrong. there are also GUI apps for which it's
> enough to just know that some of links are properties(identified by the
> "property" relation)

Hmm... it helps you to render just the property links, yes. But then the user has to choose the right link based on the title attribute.


> 4) having a general purpose link relation makes it useful and reusable
> from application to application, it eliminates need to redefine each
> time what "property" is and is media format agnostic. shared
> understanding is important i believe and additional semantics for each
> specific property is solvable on another level.

Right, but property is so generic that I have problems seeing its value. This goes a bit in the direction of Jan's question. Would you think the following would be a reasonable design choice:

   Link: </a/resource>; rel="link"

This allows your application to render all "link" links but by itself doesn't add any semantics beyond the ones the Link header already has.


[...]
> > Hmm.. I do partly agree for the /article/photo -> /article link but
> > would argue that /article/photo;prop1 does *describe* /article/photo.
> > Similarly it could be argued that /article/photo *isDescribedBy*
> > /article.
>
> Are you sure that "describedby" and "describes" relations give enough
> semantics to agents? is not it necessary to provide  some kind of
> description?

Yes, this alongside the media type of the referenced/referencing resource provides enough semantics for an agent to do something useful with it.


> if one describes another how it is described?

The media type defines that. One obvious answer is e.g. RDF.


> and what it
> gives to agent particularly in M2M interaction case? do automated
> agents strangely become smart and happy when they just identify typed
> links annotated with those relations?

No, but they do know that they can follow the link to get a description which they (may) understand. You could argue that the same is true for properties/contexts but that would mean that you, e.g., would have to define media types for all properties so that clients can express what they understand. Just returning a string as text/plain for a title property is definitely not enough to enable M2M communication without having to rely on out-of-band information.


> > So you want to express a relationship without any specific semantics?
> > In that case, why do you need a typed link? Can't you just use a
> > untyped one?
>
> Than how GUI or automated agent will distinguish resources which are
> properties accessible individually from for example the "edit" or
> "edit-form" links? or implementations are going to follow some
> convention like: if a link doesn't have relation just display it? or
> ignore 'em? or?

Displaying just links without relation would be a reasonable design choice IMO because they do not provide enough semantics to be handled automatically. Thus, the choice has to be made by the (human) user which interprets the link's label, i.e., the title attribute.


> > If article would be called slideshow or gallery, would you see it
> > then? :-) You could say that an article is a collection of
> > information, some prose, some images, maybe some movies etc.
>
> but i didn't say "gallery" or "slideshow" in my example. what if a
> resource is an ID card which has only one and only one photo of a
> person? do you think that ID card or driving license are collections?

First of all, I don't understand why such a link would have to be exposed on the HTTP layer. If you really want to, I think in such a specific case it makes much more sense to use a URL as link relation. You probably don't even have to invent it yourself as other people did already and you profit in terms of interoperability and code reusability if you just reuse it. The FOAF Vocabulary e.g., defines a "depiction" URL which you could use. See:
http://xmlns.com/foaf/spec/#term_depiction


> and yes i can not say that an article is a collection, not because we
> can not say it generally but because what you say is overgeneralisation
> of things. we can discuss everything as a collection and item but what
> you say makes me think that "collection", "item", "describes" and
> "describedby" link relations suddenly solved whole world problems.

:-) You are putting words in my mouth. I tried to show that that "property" has extremely weak semantics - IMHO too weak.


[...]
> > Could be any of those. If the article describe the photo you could
> > use "describes". If the article is more a collection of information
> > (e.g. pictures as in a gallery) you could say it is a "collection" and
> > the photo is an "item".
>
> could you please point me to the example how article describes photo?
> it would be really helpful for me!

http://en.wikipedia.org/wiki/Vitruvian_Man *describes* http://upload.wikimedia.org/wikipedia/commons/2/22/Da_Vinci_Vitruve_Luc_Viatour.jpg


> I believe i know and clearly
> understand when i can say that an article is a collection, but does it
> make whole world a collection? again, is not it overgeneralisation and
> oversimplification of things?

No, of course not. But every link is a property of a resource and thus, again IMO, "property" has too weak semantics for a standardized link relation.


> > Btw. On mailing lists it is typically considered as a best practice
> > to write text-only mails. This makes it much easier to quote etc. Could
> > you please update your client settings to send text-only mails instead
> > of HTML formatted mails. Thanks a lot!
>
> done, thanks for letting me know.

Thanks a lot! This definitely makes replying much easier



--
Markus Lanthaler
@markuslanthaler