One interesting question to others here: Would you agree with the line under this comparison that the HTML response is self-describing?
Because frankly… I kinda don’t. You need an interpreter to make sense of it, namely a web browser that knows the HTML-specification and can translate the HTML tags into meaningful semantics. But the moment I need that, I could also have a JSON interpreter in my system that uses a DSL we use internally to make sense of the JSON received, no? It’s essentially the same thing.
Yeah, HTML only makes sense in the context of a hypermedia system. They explain it in the book titled so. The main point, I think, is that JSON API consuming clients are too thick (for most purposes they’re trying to achieve) which slows down development, adds unnecessary complexity and causes developer fatigue.
A few things about that stuck out to me.
One interesting question to others here: Would you agree with the line under this comparison that the HTML response is self-describing?
Because frankly… I kinda don’t. You need an interpreter to make sense of it, namely a web browser that knows the HTML-specification and can translate the HTML tags into meaningful semantics. But the moment I need that, I could also have a JSON interpreter in my system that uses a DSL we use internally to make sense of the JSON received, no? It’s essentially the same thing.
Yeah, HTML only makes sense in the context of a hypermedia system. They explain it in the book titled so. The main point, I think, is that JSON API consuming clients are too thick (for most purposes they’re trying to achieve) which slows down development, adds unnecessary complexity and causes developer fatigue.