HN2new | past | comments | ask | show | jobs | submitlogin

He didn't go over the common example of paging by including

   nav { prev: '...', next: '....'}
in the response. But, the thing that always concerns me about this is that it requires the client to maintain state. If you consume such a web service in a web app, and the user hits "next", you'll have to have stored the next url somewhere.


Isn't the whole point of REST/Hypermedia that the client holds the state instead of the server?


If you want to show any content to the user, you'll always need to hold it in memory somewhere; that's inevitable. Storing an URL for an action is just part of the rest.

Personally, I'd just use a closure and bind it immediately to the event handler of the UI element.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: