Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, I have. To me there seems to be an abstraction leak. Specifically he's baked HTML into his entire thesis. The idea of interconnecting hypermedia together is great. It does how ever limit on to using spec'ed hypermedia like HTML. HTML is one of the only spec media that can link out of the box.

One of his goals was that a document would be able to provide links to another document in a natural, intuitive way. It is ment to be so intuitive in fact that the interchange of the document doesn't need a schema or WSDL like system. HTML has this ability. JSON however doesn't.

If one wants to nest links in JSON, one has to tell the client how those links will appear. On has to define the structure beyond merely syntaxical correctness. This is where REST falls down, IMHO.

So I recommend pursuing pieces of REST. But a full HATEOS concept seems to meaningfully limit on to symantec HTML.



> To me there seems to be an abstraction leak. Specifically he's baked HTML into his entire thesis.

No he's not, he's baked hyperlinks into his thesis as the base of REST, that has nothing to do with HTML.

> One of his goals was that a document would be able to provide links to another document in a natural, intuitive way.

No. His goal is merely that documents be hyperlinked, how is the application's domain.

> It is ment to be so intuitive in fact that the interchange of the document doesn't need a schema or WSDL like system.

I don't know where you got that one, but it's definitely not part of Fielding's thesis or his comments on the subject since. It's in fact exactly the opposite, the one thing Fielding notes must be documented in details in a RESTful service is media types, aka the documents returned by the service. That's where hyperlink semantics are added.

> JSON however doesn't.

Neither does SGML or XML, that's not an issue.

> If one wants to nest links in JSON, one has to tell the client how those links will appear.

Just as one has done with HTML.

> On has to define the structure beyond merely syntaxical correctness.

Just as with HTML.

> This is where REST falls down, IMHO.

That's complete and utter nonsense.

The only difference between HTML and JSON is that HTML is already an application of a meta-document type (well used to be, of SGML, it's drifted further but conceptually it still is) whereas JSON, much like XML, is a meta-document type from which users build applications (what do you think application/xhtml+xml is?).

You sound like you want some magical silver-bullet through which you don't have to document anything and things suddenly understand each others based on fairy dust. Reality does not work that way.


If one wants to nest links in JSON, one has to tell the client how those links will appear. On has to define the structure beyond merely syntaxical correctness. This is where REST falls down, IMHO.

Then use HTML. Or some other representation with known link semantics.

I don't see how failures or shortcomings of JSON indicate a problem with REST. They are orthogonal; JSON has nothing to do with REST, it's just a serialization format some people like.


I am not sure who wrote it, or where to even find it again, but I have read exactly what virmundi is referring to. It is possible he is confusing authors.

The long and the short of the document was that a REST client must be able to navigate the entire API when given just a single endpoint URL, much like you can navigate an entire website just by entering the homepage URL into your browser, but without the dependance on HTML.

The leap the document made, and what virmundi seems to be referring to, is that a REST client that speaks, say, JSON is not enough to traverse any random service, as everyone will provide a completely different JSON representation of their data. When you start hardcoding site-specific keys in which to find the action descriptions, you lose all of the flexibility the author claimed REST would provide in the first place.


Part of my comment is backed by the implicit constraint on HATEOS, http://en.wikipedia.org/wiki/HATEOAS.

I've downloaded the original thesis. I'll look there to see what's mentioned about the hypermedia linking process.


> Then use HTML. Or some other representation with known link semantics.

Or define link semantics in JSON, the one documentation a restful service should have is that of media types (the documents returned) anyway, the only URL which should appear in the documentation is the root of the service.

Whining that JSON has no link semantics is nonsensical, SGML does not have any either, HTML added those when it was first created as an application of SGML, just as text/xhtml+xml is an application of XML defining links, "XML" as a meta-type does not know about links either.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: