3 ms·
Shouldn't HTML in the examples be compared to something on the same abstraction level, like HAL? HAL is to JSON what HTML is to SGML. Nobody would argue thst
by k__ 5y ago
Shouldn't HTML in the examples be compared to something on the same abstraction level, like HAL?
HAL is to JSON what HTML is to SGML.
Nobody would argue thst SGML isn't suited for the web, because it too general/low-level of a language.
- recursivedoubts 5y agoThe second example in the article is HAL-like. Leaving the relative poverty of HAL as a hypermedia aside, the crux of the issue in my opinion is that JSON is consumed by code, rather than humans, and thus the flexibility and discoverability of HATEOAS is largely wasted: https://intercoolerjs.org/2016/05/08/hatoeas-is-for-humans.html https://intercoolerjs.org/2016/05/08/hatoeas-is-for-humans.h...
- k__ 5y agoYes, that might be true, I can't imagine how it should work without a human making decisions on the fly, but that's not a problem of the format.
- recursivedoubts 5y agoI would say it is not a problem of the format in theory, but it turns out to be one in practice. And that using HTML rather than JSON when explaining REST and HATEOAS would be a much more natural approach.
- k__ 5y agoThe second article you linked here makes a much stronger case than the first one. If HATEOAS doesn't work without a human, it's essentially useless for API design.
- recursivedoubts 5y agoI agree, the second article is deeper. The first is an attempt to explain HATEOAS in terms of HTML.