metadata ?! _links vs links

Showing 1-6 of 6 messages
metadata ?! _links vs links Andrei Neculau 9/26/12 5:01 AM
what would you consider resource metadata ? what would you mark with the _ prefix, and for what reason (maybe you would mark something that is not metadata)?

more specifically, are links metadata ?
why mark them as _links like HAL (Collection+JSON, Siren don't)?

Re: [api-craft] metadata ?! _links vs links Mike Kelly 9/26/12 6:00 AM
The main reason for the underscore prefixes in HAL is so that the
properties that are reserved by HAL are visually distinct.

Cheers,
M
Re: [api-craft] metadata ?! _links vs links Andrei Neculau 9/26/12 6:25 AM
Thanks, Mike. Is that the main and the only reason?
Re: [api-craft] metadata ?! _links vs links Mike Kelly 9/26/12 6:34 AM
Theoretically it reduces the chance of collisions.. there may be
others I just can't think of right now.

Is there a specific reason you bring this up or just curious?

On Wed, Sep 26, 2012 at 2:25 PM, Andrei Neculau
<andrei....@gmail.com> wrote:
> Thanks, Mike. Is that the main and the only reason?
>
>
> On Wednesday, September 26, 2012 3:00:04 PM UTC+2, Mike Kelly wrote:
>>
>> On Wed, Sep 26, 2012 at 1:01 PM, Andrei Neculau
>> <andrei....@gmail.com> wrote:
>> > what would you consider resource metadata ? what would you mark with the
>> > _
>> > prefix, and for what reason (maybe you would mark something that is not
>> > metadata)?
>> >
>> > more specifically, are links metadata ?
>> > why mark them as _links like HAL (Collection+JSON, Siren don't)?
>>
>> The main reason for the underscore prefixes in HAL is so that the
>> properties that are reserved by HAL are visually distinct.
>>
>> Cheers,
>> M
>
> --
> You received this message because you are subscribed to the Google Groups
> "API Craft" group.
> To unsubscribe from this group, send email to
> api-craft+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/api-craft?hl=en.
>
>



--
Mike

http://twitter.com/mikekelly85
http://github.com/mikekelly
http://linkedin.com/in/mikekelly123
Re: [api-craft] metadata ?! _links vs links Andrei Neculau 9/26/12 6:56 AM
It's a general question.
I have some structures which are now defined as having "links".
And gut/habit driven I was going to rename to "_links", thinking it's metadata, and as you say it will lower down the chances of name collisions.
But then I started thinking "what is metadata actually?", and ended up reading that the term is rather ambiguous, making it tough to make a clear distinction.
Re: [api-craft] metadata ?! _links vs links Felipe S. 9/26/12 12:13 PM
I wouldn't consider "links" to be metadata at all.To me they are an integral part of the application/representation.
Think of it this way: with MP3 the metadata is stuff like 'Artists', 'Album' or 'Release year'. Leave it out and you can still listen to the track.
If you leave out the "links" in representations, you client can't navigate or retrieve further resources and hence the application "state machine" is stuck.

Obviously it depends on how important the links are in your application. 

Felipe