Blog Entry
Jul 01

Where Oh Where Should Your Data Go?

Posted in News & Updates

We have been making a lot of changes in the backend programming of our gadgets to figure stuff out like how to make the data more accessible, how to get the sidebar to not lock up, and how to get the gadgets to work in UAC lockdown.  Additionally though we put a data folder into the documents folder for each user of our gadgets.

This folder is harmless though it doesn’t go away if the gadget is active because we are storing data in there as you use the gadget.  The data is in an XML format and can be read plainly so you know we’re not hiding anything illicit in there.

It has since been brought to our attention that putting the folder in the Documents folder would be considered unacceptable to some people, so we figured we would ask you all where it should go.  Keep in mind that the really big guiding idea here is that the data must be easily accessible.  That’s why we took it out of the gadget folder to begin with.  Easy data access allows for backups, recovery, deleting, and grabbing debug information that some users may need to get.

To that end, we have a poll up, please let us know what you are all comfortable with.  Thanks.  :)

 

Edit: It looks like the AppData directory has won. So from now on, the plan is to have all of our external gadget data in the AppData/Local/BuildAGadget Content directory. Thanks for voting everyone!


4 Responses to “Where Oh Where Should Your Data Go?”

  1. RD Says:

    I like the idea of using the Appdata folders (Local or Roaming subdir) for a directory for program settings, and the ‘hidden’ aspect. It’s not -too- hard to find, sort of… but your shortcuts to open the data dir is good, when UAC doesn’t silently object.

    As usual, Microsoft has to make umpteen ways to do things… e.g. C:\ProgramData, and C:\Users\(owner)\Appdata\Local …Appdata\Roaming, etc. There are many softwares that create folders in a user’s Documents directory, though I don’t think it should be for program setttings, but rather, for things the user makes or manages with a program (pictures, documents, music files, etc).
    I would -not- care for dumping a data folder in just the ‘user profile’…. as in C:\Users\(Owner)\BuildaGadget …nobody else has done that, that I can see… but in the Appdata subfolders within the ‘user profile’ is good.
    I have also seen a gadget (the ‘OnlineTV’ gadget) put its users’ ‘channel’ selections into an channels.xml file in an ‘XML’ subdir =inside= their own OnlineTV.gadget folder (in Users\(owner)\Appdata\Local\Microsoft\Windows Sidebar\Gadgets\OnlineTV.gadget\XML). The channels.xml file gets updated as you add/remove files and the UAC hasn’t complained or stopped it for me, though I’ve found a ‘quirk’ with the gadget’s maintenance of that file, and edited it directly to clean it up.
    I wish MS would enforce an OS, System, Programs, ProgData, and UserDox hierarchy and not let progs dump straight to C:\ anymore, or mod the OS/System, etc., except to add/update their own driver (not mod someone else’s). You should be able to backup ProgData and UserDox, wipe out the rest, and be able to return the system to exactly the way it was, but…oh well, dream on.
    Seems there are differences in Closing sidebar and Exiting sidebar… and you need to let sidebar fully exit/close down (hard drive activity stops), before restarting to get best results, otherwise it seems to get confused. Still gets confused anyway… and there also seems to be a difference when installing gadgets with UAC on vs installing gadgets with UAC off… sometimes. Too many cooks (or hooks) spoiling the… app environment.

  2. The Staff Says:

    Yeah, it would be nicer though if the AppData folder wasn’t hidden by default (we’re thinking more for the people who don’t know about hidden folders, so this is something of a way to get some of the stress off from us walking people through stuff).

    If we put the data inside the .gadget itself, it’ll get overwritten when the gadget gets updated. We did have it in the gadgets directory, but that is such a pain in the butt to get to that we made a decision to move it.

    Indeed, it’s interesting to compare how much control the API gives us vs. what the system will actually let us do.

  3. G-Up Says:

    Just using Appdata Folders

  4. The Staff Says:

    Yeah, we’re starting to get that impression. There some other options handed out including leting people choose (too confusing for something like this work well, but good thought for other stuff), and the ProgramData folder as specified from spec (not bad, but still unsecure).

    AppData->Local may be the winner, just going to give this a day or two more for anyone else who wants to vote.