This is a design question.
I have a dynamically changing list that works by creating DOM elements and populating them with the fields and these list elements can be added and removed. However, I'm not sure how to design the interaction with the backend server through POST/GET requests. If it helps, I'm using mongoDB and python flask.
My problem is that I'm not sure how to, given an list element (a div container as a list element), retrieve sufficient information about said list element to complete the POST/GET requests.
Should I attach additional fields to the div element itself that holds data like name, description, timestamp? Or should I have a JSON object that keeps track of each list element by id (or something) and it's associated identification data? Or should I be doing something else altogether?
As a side node, where can I turn to learn these design/stylistic things? Thanks!