I have an app that has settings the user can pick before running the app. The settings are stored in a database. The entire app uses these settings. Right now, each class that uses the settings calls the database in its constructor to load the settings into a class. This seems odd to me because, the settings shouldn't change in the middle of running the app. So, how do you have your Application Settings called?? Do you use a static class or a singleton pattern instead of hitting the database each time to call the same settings??
Yes, I usually throw that kind of stuff in a static Application class, especially if there's no reason to query multiple times.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With