3 ms·
This stuff isn't new, it just isn't widely adopted yet. OpenSearch does stuff like this: http://www.opensearch.org/Specifications/OpenSearch/1.1/Draft_4 http:/
by buro9 16y ago
This stuff isn't new, it just isn't widely adopted yet.
OpenSearch does stuff like this:
http://www.opensearch.org/Specifications/OpenSearch/1.1/Draft_4 http://www.opensearch.org/Specifications/OpenSearch/1.1/Draf...
It describes an interface (Atom XML based) that further self-describes how it was called and what you can do to it (how to search within results, for example).
Simply applying that thinking to JSON based RESTful services gives you that question "What can I do with this?", and that makes building the API easier... for everything you serve describe what can be done with it and how you were called.
This then totally de-couples the request from the client, the client can send many queries and not care about them, and get back something that encapsulates the state of the request (search terms), the state of the result (search pagination) and the verbs for each entity (what you can do with it).
I never would've called this "Hypermedia Controls", I think that's confusing.
It's just having your interfaces describe themselves and be discoverable. Coupled with a WADL-style thing (but probably not WADL itself... perhaps JSON such as on the Freebase API: http://code.google.com/p/google-refine/wiki/ReconciliationServiceApi#Service_Metadata http://code.google.com/p/google-refine/wiki/ReconciliationSe... ).
Perhaps we all just need a new catchphrase or buzzword though, just to get the wider industry onboard? I'd rather just say that your services should be discoverable, and that means within the results telling us what we can do, in addition to a top level thing to describe which services exist.