Re:A bird's eye view on API development
by spdionis on Tuesday November 17, 2015 @06:34AM
(#10580426)
In my experience for most REST APIs use cases HATEOAS is not needed or not that useful. Writing a REST API for your mobile application? What do you need HATEOAS for? Do you really think it can replace documentation?
On the other hand all the rest of nice bonuses of REST APIs are very useful in such a use case.
Exactly, that's where most implementations seem to decide against REST.
I agree with you. The other parts of REST (if you agree that REST can be picked apart and still referred to as RESTful), as surely valuable.
Building SPA using Siren, it can be really useful for disabling parts of UI - when you have complex rules on whether user can list/edit/create resource, you just check if such action is in response and use its options.
Yes, you can do same with bool flags in response, but if you structure all your decision making like this (around Resources and actions) it's quite easy and natural to make all your components react to un/availability of resource/action, thus accomodating even more complex scenarios - user can list, edit (only some), but can't create new.
That's different to REST's automated discoverability for REST API clients.