|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.
|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:> --
> You received this message because you are subscribed to the Google Groups
> "API Craft" group.
> To unsubscribe from this group, send email to
> Visit this group at http://groups.google.com/group/api-craft?hl=en.
|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.
Am Mittwoch, 26. September 2012 15:56:20 UTC+2 schrieb Andrei Neculau: