Single-Page Web Apps: Client-side datastores & server persistence
- by fig-gnuton
How should client-side datastores & persistence be handled in a single-page web application?
Global vars vs. DI/IoC: Should
datastores be assigned to global
variables so any part of the application can access them? Or should
they be dependency injected where
required?
Server persistence: Assuming a
datastore's data needn't always be
persisted to the server immediately,
should the datastore itself handle
persistence? If not, then what class
should handle
persistence and how should the persistence class fit into the client-side architecture overall?
Is the datastore considered the model in MVC, or is it something else since it just stores raw data?