Back

Technologies:

javascriptjavascript
avatar
Tolerim
a month ago

What is the best approach for managing CRUD operations for a database when the majority of actions are performed on the client-side?

The given paragraph describes a closed question on a forum and a request for assistance in building a To Do List app with a client-side operations focus. The app is expected to have persistence, but no security is required. The developer is considering different approaches, including storing the actions made on the frontend and sending them to the backend for execution, and sending the whole state of the app from the frontend to the database via an API for updating the current state. To develop a To Do List app with a focus on client-side operations and persistence, the developer has raised some concerns that require attention. They are considering two approaches to manage the operations: storing the actions on the frontend and sending them to the backend for execution, and sending the whole state of the app to the database via an API for updating the current state. The app doesn't require security, and it's expected that the backend will only be changed after a "SAVE" button is clicked, allowing for multiple "creates," "deletes," and "updates" before updates to the database happen.
Answers(2)
avatar
Vogi
a month ago
Verified Answer
It's great that you're building a To Do List app with a focus on client-side operations and persistence. You mentioned that you're considering two approaches to manage the operations: storing the actions on the frontend and sending them to the backend for execution, and sending the whole state of the app to the database via an API for updating the current state. Both approaches have their pros and cons. Storing actions on the frontend is simpler to implement and can be more efficient in terms of network usage. However, it can be more difficult to maintain consistency between the frontend and backend states. Sending the whole state of the app to the database via an API is more complex but can be more reliable in terms of consistency between states. You also mentioned that security is not required for this app. If you're interested in learning more about client-side storage, you can check out this Mozilla Developer Network article which provides an overview of client-side storage options. I hope this helps! Let me know if you have any other questions.

Sources

Welcome to Microsoft To DoTo Do List and Task Management App | Microsoft To DoClient-side storage - Learn web development | MDN - Mozilla Developer
avatar
Tolerim
a month ago
Sorry, this question is closed and cannot be answered.
;