I have a growing web application which now needs to be able to store user and system preferences / settings. In the past I've always rolled my own preferences system for web applications but I was wondering what other people do to solve this problem? Are there any preference libraries for web applications that people could recommend?
Ideally user preferences should have a default value which the user can then override. Not all preferences should be exposed to the user though as some will be for things such as the last position of a dialog box.
If I go the roll-my-own route I think it will be a separate preferences table with all the preferences stored as strings converted to their true, primitive, data type as required. e.g. a table something like key,user_key,setting_name,setting_value. I favour this approach to a column per data type because it stops a setting from accidently ending up with two values and the consumer of a setting should know what data type they want.