3 ms·
I don't understand your arguments at all. Here's a concrete way in which a single page app may make use of it, without affecting UX at all: Instead of hardcodi
by vidarh 14y ago
I don't understand your arguments at all. Here's a concrete way in which a single page app may make use of it, without affecting UX at all:
Instead of hardcoding a URI hierarchy to determine where to issue a request to in order to take various actions on a message in a collection, look for link tags to specify them.
The immediate benefit is that it allows the server to signal 1) what actions it supports in the current context. E.g. if you're logged in as a user with restricted credentials, it might not return a link for the "delete everything" action, and when the rules change only the server side (which already needs the knowledge of the rules to validate requests) will need to change 2) endpoints can trivially change and the client side application is automatically up to date.
How much harder is this? You need to output a few extra tags and attributes. On the client you need to replace some hardcoded strings with lookups based on an xpath expression. But at the same time there are many cases where you may be able to remove duplicated logic.