4 ms·
With SPA you usually dont add frontend state on top of backend state, you only have the frontend part, and a stateless API. This makes it very easy to test and
by thecatspaw 8y ago
With SPA you usually dont add frontend state on top of backend state, you only have the frontend part, and a stateless API.
This makes it very easy to test and reason about.
- marcosdumay 8y ago> stateless API Does it not access any data?
- TimJYoung 8y agoMost JSON/data APIs for SPAs are similar to SQL database servers: maintaining a persistent connection is useful for performance reasons, but there's nothing about the API that dictates that it's required. The only state that is required across API calls is an authenticated session, and that is maintained on the server side.
- thecatspaw 8y agoand even authentication can be done stateless. Makes load balancing easy since each request can go to a different server
- throwaway2016a 8y agoIt is generally accepted that when someone uses the phase "stateless API" they mean session state not data persistence.
- marcosdumay 8y agoYes, and this does nothing to help with the problem of state coherence between the backend and frontend.