views:

341

answers:

4

I'm building a fairly large enterprise application made in python that on its first version will require network connection.

I've been thinking in keeping some user settings stored on the database, instead of a file in the users home folder.

Some of the advantages I've thought of are:

  • the user can change computers keeping all its settings
  • settings can be backed up along with the rest of the systems data (not a big concern)

What would be some of the caveats of this approach?

+4  A: 

One caveat might depend on where the user is using the application from. For example, if they use two computers with different screen resolutions, and 'selected zoom/text size' is one of the things you associate with the user, it might not always be suitable. It depends what kind of settings you intend to allow the user to customize. My workplace still has some users trapped on tiny LCD screens with a max res of 800x600, and we have to account for those when developing.

CodeByMoonlight
There would most likely be few to none computer dependent settings as is an enterprise application mostly working with numeric datasets.
voyager
+2  A: 

Do you need the database to run any part of the application? If that's the case there are no reasons not to store the config inside the DB. You already mentioned the benefits and there are no downsides.

Andrew from NZSG
Thanks, I'm just trying to see if I've missed something. The application *does* use a database, and I'm even planning to add a local mirror of the database to allow working off-line, so access to the settings "file" wouldn't be a problem.
voyager
Whoa, Andrew! Haven't seen you around in a while. Welcome back.
SquareCog
+7  A: 

This is pretty standard. Go for it.

The caveat is that when you take the database down for maintenance, no one can use the app because their profile is inaccessible. You can either solve that by making a 100%-on db solution, or, more easily, through some form of caching of profiles locally (an "offline" mode of operations). That would allow your app to function whether the user or the db are off the network.

SquareCog
Its pretty much what I was thinking to do, at least some time in the future.
voyager
+2  A: 

It's perfectly reasonable to keep user settings in the database, as long as the settings pertain to the application independent of user location. One possible advantage of a file in the user's home folder is that users can send settings to one another. You may of course regard this as an advantage or a disadvantage :-)

Vinay Sajip