4 ms·
We're working with a HATEOAS API on our current project. One area it really shines is in pagination. The API abstracts away both a MySQL and a CouchDB databas
by 5avage 14y ago
We're working with a HATEOAS API on our current project. One area it really shines is in pagination. The API abstracts away both a MySQL and a CouchDB database. When paginating through SQL, the "next" and "prev" links are simply setting skip and limit parameters, but in Couch they're supplying keys and documents (because "skipping" 10,000 records in a b-tree is a really bad idea). The application no longer is exposed to implementation details; it simply follows the links.
Plus, when you can "surf" your API by following links in JSON documents, you start to twig how it's a pretty powerful thing. It takes client developers about a day to get over the strange feeling they get yielding state control to the back-end...