Stephan van Hulst wrote:It's a bad idea to make mutable data globally accessible.
Do you have a good reason not to pass data to constructors?
Yes, I think so. Up until now the application could run under one common userid and password which I set as global variables.
Now I have a need to run the application based on a mode setting. So I have set the userid and password as fields of a defaults class where it can be set dynamically.
In this scenario I would have to send the defaults class to my connection class.
I have the following code in my app over 2300 times.