This is a proof of concept of an idea where I use HTML as the content type (instead of JSON) and pjax for routing. This provides several key benefits.
-
API is browseable since it’s HTML
-
API HTML is separate from UI HTML
-
API is useable with <noscript>
-
API is crawlable by crawlers. No need to render the UI client side with a headless browser.
-
Entire API could change completely from a URL structure perspective and app would still work
-
No need to manage separate JSON API
-
Developers manage HTML representations, Designers manage UI HTML