The Atom link element and the Link header name their links using the “rel” attribute. There is a requirement in the Atom Syndication Format and Link header RFCs that states that if the relationship is not registered with IANA, that you must use a IRI instead of a simple name. Maybe I’m misinterpreting things, but it seems that this IRI must point to an actual resource that describes the link relationship. IMO, this will make using links awkward as REST permeates into the application development space. Why? Applications will define new links. It would be rather silly for each application to register themselves at IANA for every link they define. So, they are stuck putting in an IRI that may change over time. Clients that consume resources will be looking for specific relationships to do their processing. The Link header specification, I think, tries to mitigate this problem by introducing a “title” attribute. Which, still will be weird, because clients will be looking up “rel” or “title” attributes depending on what link relationships that want to traverse. Seems very inconsistent to me.
What I wish they had done (or would do) is define a “relref” that is an optional URL to the description of the non-standard link relationship. That way the rel attribute remains simple and not overloaded.
If I’m misinterpreting things, apologies. But thats what I seem to read and what I see in examples.
Nov 20, 2009 @ 00:47:55
Yeah, the use of full URIs is kinda messy to look at, but that’s the only downside I can see. Since it’s _machines_ that will be interpreting these values, not humans, it hardly matters what it looks like, right?
This is no different than Doc-Type, XML Schema Namespaces and other similar identifiers.
Nov 20, 2009 @ 14:13:54
Its not what it looks like that bothers me. Again, for an application, the URI could easily become invalid. Also, what happens when and if you do register with IANA? Finally, “rel” is very different than XML Namespaces. With “rel” the “namespace” and schema location are the same thing. There’s a clear separation within XML that’s missing in and Link.