I just want to throw this out there to see what more experienced coders think…
I am working on my second Full Stack application, a ToDo App (don’t judge me). And again I find myself struggling to choose which approach to go with for getting user input into the Back End DB.
On one extreme, I could do Create/Update calls with every user keystroke.
- PRO: User would have very low risk of loosing data if loosing internet connectivity in the middle of managing ToDo’s.
- CON: High latency on Front End…? Heavy demand on Back End especially with hundreds of thousands of Users…?
On the other extreme, I could only do the Create/Update/Delete calls to the Back End when the user clicks an “Update” button, or when logging out.
- PRO: Probably the best in terms of latency and server workload.
- CON: High likelihood of data loss if users PC, Browser, or Network fails.
I know there is no one right way to do this, and there are many different approaches between the two extremes I listed above.
I’m just looking to start a discussion so we all can learn what the more experienced developers think. Is there a “Common Practice” for this kind of thing?
I thank you all in advance for your thoughts.