Config versus Database
I was thinking a little about the pros and cons of storing configuration data in config files versus using a database. I have to tell you, that for all of the learning and work I did for POP Forums (like two years ago!) seemed pretty slick at the time, but now I'm not so sure that using config files is the way to go for most things.
I guess the change of heart came around because back in the day, and by that I mean the ASP.old days, we didn't have caching, and I had no idea what a static anything was. Sure, I stored stuff in the application object (*shudder*), but I still didn't really think the way I do now.
- Simple text changes change config
- Notepad r0X0rz teh big one!!!!1111
- If you don't externalize the file from web.config, your app restarts on changes
- Simple config sections suck for large blocks of text (like TOS or e-mail templates)
- Who wants to wade through text files and not UI? (yeah, I know you can programmatically alter them)
- Cache your junk
- Big giant text field capable
- Not as trendy as .NET config files
- Potentially big load on app start (though I don't know it's worse than config files)
I guess in the end it doesn't matter, but what's starting to concern me is that the more crap you have in config files, the harder they are to manage. We already have to put all of our HttpModules and HttpHandlers there, Atlas adds a huge ton of crap, sometimes you still need those lame AppSettings things, etc. It's just so non-tidy.