• 0

c# Win8 Store app: ApplicationData limit, thoughts?


Question

Hello gang,

 

I have been created the next version of my app Bedia ( found here: http://www.blissgig.com/display.aspx?id=13 ) as a Windows Store app.  The application stores a collection of user selected Folder Paths for the Home Page.  The version mentioned above saves the user settings within an XML file.  The standard for holding settings in a Win8 Store app is the ApplicationData.LocalSettings ( http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.applicationdata.localsettings(v=win.10).aspx )  The limit for each setting is 8k, with a folder path being able to be up to 255 characters this would allow me to have over 30 selected Folders.  I really don't like the idea of limitations within an app (and yes, of course all apps have limits, but I think you get my point here)

 

So I thought I'd ask if anyone had a better idea or any thought on these limitations.

 

Thanks

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

I'm not a Store app developer--but can't you compress your settings file?  XML compresses ridiculously well, so if the "settings" you're allowed to save can be a random BLOB, that would greatly expand the amount of data you can include.

 

Failing that--can you not make your app save its settings as a document to the user's SkyDrive folder, or something like that?

Link to comment
Share on other sites

  • 0

Using the XML and placing it within the settings would be larger than just holding a list of the values in the setting.  I could still use XML to hold these values, and I may, I just want to make sure that if there is a better pattern that I use that.

 

Thank you kindly for the response

Link to comment
Share on other sites

  • 0

I'm not a Store app developer--but can't you compress your settings file?  XML compresses ridiculously well, so if the "settings" you're allowed to save can be a random BLOB, that would greatly expand the amount of data you can include.

 

Failing that--can you not make your app save its settings as a document to the user's SkyDrive folder, or something like that?

 

App data in Skydrive folders is a no-no for Windows Store submissions.

 

@OP: Did you check and see if roaming storage provides more or less room? I seem to remember one of them being less limited. I use a compressed stream to store stuff in the settings folders.

Link to comment
Share on other sites

  • 0

Store the information in a data file, not the settings file.

 

Now *that* is allowed to go in a SkyDrive folder. :)

 

Btw, it's only the individual settings files that are size restricted, not how many you can have.

Link to comment
Share on other sites

  • 0

Now *that* is allowed to go in a SkyDrive folder. :)

 

Btw, it's only the individual settings files that are size restricted, not how many you can have.

 

I don't have any need or desire to have Skydrive hold the settings.   But you do bring an interesting idea of having one setting; "Number of folders" value = x, and then settings such as Folder1, Folder2, etc.  Not elegant, but I'll think about it

Link to comment
Share on other sites

  • 0

Umm, there's no limit to the size of the local settings DB (the key/value pair storage). Even the roaming one isn't technically limited, but it will stop roaming if you exceed 100k after compression (not sure if it's increased for 8.1 or not).

 

But then, you should consider whether you really want to be using the key/value pair storage at all and not just writing your XML file into the Local AppData folder. The key/value pair thing is nice for one-off toggles or simple setting values (like ColorScheme="blue"). It also makes for a pretty effective persistent dictionary/hashtable, especially when combined with roaming. But it's not for everything. The file APIs exist for a reason.

Link to comment
Share on other sites

  • 0

I don't have any need or desire to have Skydrive hold the settings.   But you do bring an interesting idea of having one setting; "Number of folders" value = x, and then settings such as Folder1, Folder2, etc.  Not elegant, but I'll think about it

 

Why would you do anything like that? You can already create sub-containers under LocalSettings, the containers are enumerable, and there's no limit on how many items can live in a container. The biggest problem you'd likely have with this approach is that you can't (easily) persist the ordering, and you'd be limited in options for adding metadata to each entry in the future. These are good reasons to just write your XML file to disk instead.

Link to comment
Share on other sites

  • 0

Why would you do anything like that? You can already create sub-containers under LocalSettings, the containers are enumerable, and there's no limit on how many items can live in a container. The biggest problem you'd likely have with this approach is that you can't (easily) persist the ordering, and you'd be limited in options for adding metadata to each entry in the future. These are good reasons to just write your XML file to disk instead.

 

Thanks again Brandon.  Yea, I wasn't really happy with the Folder1, etc pattern.  Actually I may simply use a text file with a list of values.  It maybe just that simple.

Link to comment
Share on other sites

  • 0

Now *that* is allowed to go in a SkyDrive folder. :)

 

Btw, it's only the individual settings files that are size restricted, not how many you can have.

 

Apologies for not being clear; that's essentially what I meant--storing that user data as data files, not settings.  As I said, I'm not a Store developer (yet) so I'm not up to speed with the best practices and terminology.  Whether it's SkyDrive or the user's own (local) Documents folder--whatever works / allowed to, as long as it's not app settings.

Link to comment
Share on other sites

This topic is now closed to further replies.