Specifically in Angular, but interested in any technique used. I am just curious in typical patterns where a either a list of some sort is modified on the client side so that change is sent to the server. Here there are couple of obvious scenarios.
The first is you just fetch the entire list again and update the client store.
The second is you optimistically update the client and hope for 200 OK else you roll it back.
The latter offers performance at the expense of being out of sync with the server. Is that what people do? Is there some method/pattern (Spring, Angular) that people use to stay in sync?
The only other way I can think would be for a client to subscribe to an endpoint on the server and maintain the open connection.
Any other ways?
Aucun commentaire:
Enregistrer un commentaire