4 ms·
CRUD, Only When You Can Afford It (2004)
- brudgers 11y agoDate: 2004
- livingparadox 11y agoThe problems stated in the article seem to be solvable with two best practices I've seen recommended. 1) For the issue of conflicts with multiple updates, instead of mass updating the whole object, you send only the changed values (e.g., send only the changed balance value not any other values). 2) For more complicated actions such as a transfer of funds, create a new resource that handles those complexities on the back end (why should the user have to manually update both accounts? Or better yet, why should they be allowed to do so?). In this case, a `transaction` endpoint, which specifies the receiving account, source account, and the amount transferred. With that change, it still CRUD (you're creating a transaction), but none of the issues come into play.