After making a webservice call and gathering data for your model data, i can think of a few ways to persist the model until the application process terminates:
- save the model as static variable so its in memory and fast to access
- write the model data to a DB. Access the db tables when data is needed. this is slightly slower depending on how much data your trying to get and searches.
- create a singleton dataModel but this is # 1. I could inject it using Dependency injection so it would not be seen as a singleton.
- pass the model data from class to class via parameters. this might be good for testing different model data, etc
This is all i can think of. What is the recommended way in design architecture like MVC to create a model available to the entire application?