posted 19 years ago
In my own apps, I've overcome this quandry by creating a system where I have simple data objects loaded by other objects. It makes the simple data objects agnostic of who, when, why, or how they are loaded, so I can change out the loader (interface: Loader) via a factory or other method without changing the rest of the code.
"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The JavaPerformanceTuning.com team, Newsletter 039.