Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Stella

macrumors G3
Original poster
Apr 21, 2003
8,890
6,491
Canada
Hi,

I'm wondering the best method for managing runtime application data. By "Application Data" I mean data that is used during application runtime - data entities et al, but these don't necessary need to be persisted to the Touch 'disk'.

I could create singleton classes that any form controller / other classes can reference at will. I'm wondering if there is a better way?

A lot of UI objects do have the 'datasource' Outlet but it would be tedious to link these up to data objects.

So, I'm wondering what other people do to manage run time app data?

Thanks
 
So, I'm wondering what other people do to manage run time app data?
Singletons are certainly a solution, sure. You could also use NSUserDefaults. Or add properties to the appDelegate (a singleton itself). You could also consider using CoreData or perhaps even a SQLite database. And there are probably other approaches that I've missed.
 
Thanks, if singleton's are 'ok' for objectiveC then i'll keep with that - coreData is a bit overkill.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.