Looks like passing it to the objects as an argument is the preffered solution. My only issue with that is that I have a relatively large object hierarchy, with something similar to the following objects:
So now if E needs access to the config module I'll have to pass it all the way down.
Yes, passing is slightly more typing, but if you don't, then you're accessing a global variable -- which is worse? The following might shed a little light
Why Singletons are Evil - Being Scott Densmore - Site Home - MSDN Blogs , Use your singletons wisely ; Know when to use singletons, and when to leave them behind
So a global app configuration is common use of a singleton ... I've used it, I've seen it used ... I don't really have an informed opinion :)
In reply to Re^2: Access to single object from multiple other objects
by Anonymous Monk
in thread Access to single object from multiple other objects
by elTriberium
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |