Hacker Newsnew | comments | show | ask | jobs | submit login

A few thoughts:

* Mike Kelly (the author of the HAL spec) is not aiming for a universal API client http://news.ycombinator.com/item?id=4949357 (and also seems to be under the impression that no-one else is either).

* A universal client seems impossible because APIs will typically need to use service-specific link relations for all "interesting" relations (e.g. product, author). You might be able to share generic link relations (like those in IANA's table: http://www.iana.org/assignments/link-relations/link-relation...), but sharing only these doesn't seem to be worth the effort.

* Hypermedia-powered experimentation is kinda cool, but you're still going to need something to drive it (see e.g. Kelly's HAL browser http://haltalk.herokuapp.com/explorer/hal_browser.html#/), at which point you might as well write a full-fledged API dashboard.




Why would you want to write a dashboard from scratch every time? Foxycart used HAL for their API, and when they'd finished they pointed the browser at it and instantly had a browsable API.. for free.

-----


Well, companies seem to like to brand their dashboards, emphasise different aspects and so on. But still, I agree it would be really cool if you could use the same API browser everywhere, to avoid crappy dashboards, and that HAL would could enable that.

How can I point the HAL browser at foxycart's API? Or even see Foxycart's browser? I can only find standard hand-written documentation.

-----


We already have a 'universal API client' called the browser. Therefore, implementing a NEW one isn't very interesting.

-----


Sorry, I don't get what you're responding to. Browsers don't understand hypermedia APIs (or even HAL)--they only grok HTML.

-----


> Browsers don't understand hypermedia APIs (or even HAL)--they only grok HTML.

HTML is a hypermedia media type. A server spits it out, the client (a browser) consumes it.

A browser is a generic hypermedia API client, for services that expose HTML.

-----


please can we not stretch the definition of hypermedia "API" to include HTML. HTML is a hypermedia type, but it's primarily for representing information for human consumption, so it's not an API in the sense most people understand.. why confuse things?

-----


It's not stretching the definition: HTML and the web are where RESTful principles are defined from. They're the OG hypermedia API.

> it's not an API in the sense most people understand

Neither are hypermedia APIs in general.

-----


I know where REST came from, my point is that - as far as normal people are concerned - HTML web apps are.. apps.. not APIs.

-----




Applications are open for YC Winter 2016

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: