Loading ...
Sorry, an error occurred while loading the content.
 

Re: [rest-discuss] Re: Using # in link relations to distinct links of the same relationship type?

Expand Messages
  • mike amundsen
    i would not use the @rel value as a sort key, either. mca http://amundsen.com/blog/ http://twitter.com@mamund http://mamund.com/foaf.rdf#me ... i would not use
    Message 1 of 5 , Dec 1, 2011
      i would not use the @rel value as a sort key, either.

      mca
      http://amundsen.com/blog/
      http://twitter.com@mamund
      http://mamund.com/foaf.rdf#me




      On Thu, Dec 1, 2011 at 02:10, Jakob Strauch <jakob.strauch@...> wrote:
      Well, i think i meant something different: I want to express a relation ship like "the fifth element", no matter which entity it links to.

      Orders of a customer:

      <link href="/orders/2011/january/123" id="123" rel="http://example/order#1"/>
      <link href="/orders/2011/june/987" id="987" rel="http://example/order#2"/>

      There are already some relationship types for a small subset of this kind of relations: "first" and "last".

      I ran into this questions while enhancing Darell Miller´s HAL serializer with the latest WCF Web API bits...



      --- In rest-discuss@yahoogroups.com, mike amundsen <mamund@...> wrote:
      >
      > using HTML as an example...
      >
      > when servers i write want to pass the identity of an item in a response
      > representation, i use @id (unique) or @name (non-unique) attributes
      >
      > the client apps i write use the @rel & @class attributes (both non-unique
      > multi-valued fields) as a semantic identifier (i.e. what this _means_).
      >
      > i follow the same general rule for any custom designs (XML, JSON, etc.)
      > that i create.
      >
      > mixing identity and meaning into the same attribute is, IMO, not a good
      > idea. esp. in the long-term.
      >
      > mca
      > http://amundsen.com/blog/
      > http://twitter.com@mamund
      > http://mamund.com/foaf.rdf#me
      >
      >
      >
      >
      > On Tue, Nov 29, 2011 at 17:54, Jakob Strauch <jakob.strauch@...> wrote:
      >
      > > Several times i came to the question, wheter to specify a relation with
      > > some kind of index to distinct links of the same relationship type.
      > >
      > > examples:
      > >
      > > GET /products/canon
      > > <category name="canon" ...>
      > >   <link href="..." rel="http://example.com/item#1" .../>
      > >   <link href="..." rel="http://example.com/item#2" .../>
      > >   <link href="..." rel="http://example.com/item#3" .../>
      > > </category>
      > >
      > >
      > > With this, one could give same relation-types different weights, an
      > > order/index or different nuances.
      > >
      > > Is it worth thinking about? Would it break something? What are the
      > > arguments ´bout this topic around here? What are alternatives?
      > >
      > >
      > >
      > >
      > >
      > > ------------------------------------
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      >




      ------------------------------------

      Yahoo! Groups Links

      <*> To visit your group on the web, go to:
         http://groups.yahoo.com/group/rest-discuss/

      <*> Your email settings:
         Individual Email | Traditional

      <*> To change settings online go to:
         http://groups.yahoo.com/group/rest-discuss/join
         (Yahoo! ID required)

      <*> To change settings via email:
         rest-discuss-digest@yahoogroups.com
         rest-discuss-fullfeatured@yahoogroups.com

      <*> To unsubscribe from this group, send an email to:
         rest-discuss-unsubscribe@yahoogroups.com

      <*> Your use of Yahoo! Groups is subject to:
         http://docs.yahoo.com/info/terms/


    • Mike Kelly
      the xml variant for HAL has @name for handling this already. It s meant to be used as a secondary key to @rel. Mike - the problem with using @id (unique in the
      Message 2 of 5 , Dec 1, 2011
        the xml variant for HAL has @name for handling this already. It's meant to be used as a secondary key to @rel.

        Mike - the problem with using @id (unique in the whole document) is that it undermines any other intended control data on the link such as @rel - since it's likely your clients will overlook it completely.

        Cheers,
        Mike

        On Thu, Dec 1, 2011 at 9:51 AM, mike amundsen <mamund@...> wrote:


        i would not use the @rel value as a sort key, either.
        On Thu, Dec 1, 2011 at 02:10, Jakob Strauch <jakob.strauch@...> wrote:
        Well, i think i meant something different: I want to express a relation ship like "the fifth element", no matter which entity it links to.

        Orders of a customer:

        <link href="/orders/2011/january/123" id="123" rel="http://example/order#1"/>
        <link href="/orders/2011/june/987" id="987" rel="http://example/order#2"/>

        There are already some relationship types for a small subset of this kind of relations: "first" and "last".

        I ran into this questions while enhancing Darell Miller´s HAL serializer with the latest WCF Web API bits...



        --- In rest-discuss@yahoogroups.com, mike amundsen <mamund@...> wrote:
        >
        > using HTML as an example...
        >
        > when servers i write want to pass the identity of an item in a response
        > representation, i use @id (unique) or @name (non-unique) attributes
        >
        > the client apps i write use the @rel & @class attributes (both non-unique
        > multi-valued fields) as a semantic identifier (i.e. what this _means_).
        >
        > i follow the same general rule for any custom designs (XML, JSON, etc.)
        > that i create.
        >
        > mixing identity and meaning into the same attribute is, IMO, not a good
        > idea. esp. in the long-term.
        >
        > mca
        > http://amundsen.com/blog/
        > http://twitter.com@mamund
        > http://mamund.com/foaf.rdf#me
        >
        >
        >
        >
        > On Tue, Nov 29, 2011 at 17:54, Jakob Strauch <jakob.strauch@...> wrote:
        >
        > > Several times i came to the question, wheter to specify a relation with
        > > some kind of index to distinct links of the same relationship type.
        > >
        > > examples:
        > >
        > > GET /products/canon
        > > <category name="canon" ...>
        > >   <link href="..." rel="http://example.com/item#1" .../>
        > >   <link href="..." rel="http://example.com/item#2" .../>
        > >   <link href="..." rel="http://example.com/item#3" .../>
        > > </category>
        > >
        > >
        > > With this, one could give same relation-types different weights, an
        > > order/index or different nuances.
        > >
        > > Is it worth thinking about? Would it break something? What are the
        > > arguments ´bout this topic around here? What are alternatives?
        > >
        > >
        > >
        > >
        > >
        > > ------------------------------------
        > >
        > > Yahoo! Groups Links
        > >
        > >
        > >
        > >
        >




        ------------------------------------

        Yahoo! Groups Links

        <*> To visit your group on the web, go to:
           http://groups.yahoo.com/group/rest-discuss/

        <*> Your email settings:
           Individual Email | Traditional

        <*> To change settings online go to:
           http://groups.yahoo.com/group/rest-discuss/join
           (Yahoo! ID required)

        <*> To change settings via email:
           rest-discuss-digest@yahoogroups.com
           rest-discuss-fullfeatured@yahoogroups.com

        <*> To unsubscribe from this group, send an email to:
           rest-discuss-unsubscribe@yahoogroups.com

        <*> Your use of Yahoo! Groups is subject to:
           http://docs.yahoo.com/info/terms/





      Your message has been successfully submitted and would be delivered to recipients shortly.