What is a "data model", and how does it relate to the DOM in a front-end application?
The data model, is the state of the data that is being stored. For instance in an e-commerce-site the checkout bag is filled with items, somewhere behind the scenes in javascript that data is being stored. The data-model relates to the DOM in a front-end application, because the DOM should be dependent on the data-model and use that to display items, prices, quantities, and descriptions to the User. Additionally, sometimes the user will be interacting with the dom and as a result the data model should update a shopping cart of items, for instance. The data-model essentially becomes the state of truth and the DOM depends on the data-model to portray an accurate representation of the data. Issues can arise when the DOM & Data-Model are not in sync and nasty bugs can occur. An example of this is how movies were stored inside of the state of our app in my Rancid Tomatillos project. The Movies, Cards, and Details components used