2

Here is a question not about code but about patterns. I'm developing a .Net application that needs to use three files in order to work properly.

  • File 1: Has the app settings created by a configuration form
  • File 2: Binary file that contains a set of serialized objects used as a playbook that the application follows in order to realize sequential tasks.
  • File 3: A sqlite database used as a record cache that the application updates on every start

Now my question is about file location, where to put this files? On Program Files or AppData inside the users's Documents And Settings.

Thanks in advance.

asolenzal
  • 500
  • 7
  • 23
  • Do you want the users to have unique files or should every user access the same file? – jAC Jun 19 '17 at 14:55
  • This is an opinion based question, thats not considered a valid question here. I'll give you my opinion anyway. I think you should put it in the AppData, since it isn't exactly the users data. He will likely not know what these files are and delete them. When he messes around in the AppData he should know what he's doing. – Romano Zumbé Jun 19 '17 at 14:57
  • Isn't there enough questions like this around, e.g. [this](https://stackoverflow.com/q/10563148/1997232) or [this](https://stackoverflow.com/q/13483837/1997232) ? I personally like [tag:design-patterns] tag in the question the most. – Sinatr Jun 19 '17 at 15:32
  • There are times when the opinions given by a lot of people may resolve a problem by joining or by intersecting them. Maybe this question can help someone some day. This goes to all the experts that put my question on hold – asolenzal Jun 20 '17 at 00:27

1 Answers1

1

AppData should always be preferred, since it requires less permissions (you might need Administrator permissions to create / updated files in Program Files).

Also it depends whether data should be personalized or global for all users. Take a look at this post

the_joric
  • 11,986
  • 6
  • 36
  • 57