JavaScript Entity Table Model
Let’s learn how to make a JavaScript entity table model.
We'll cover the following...
Make a JS entity table model
Since we use the browser’s local storage as the persistent storage technology for our example application, we need to deal with simple key-value storage. For each design model class that has a singular and capitalized name (for example, Entity
), we use its pluralized lowercase name (entities
) as the corresponding table name. We also use it as a key. Its associated string value is obtained if we serialize the object collection method Entity.instances
with the help of the JSON.stringify
method.
We design a set of suitable JS entity tables in the form of a JS entity table model that we derive from the information design model. We need to ...