shahine.com/omar/

homepage | Send mail to the author(s) contact

yet another Microsoft blogger

 Monday, February 27, 2006

"My" Documents

That folder in Windows is called “My Documents” not your documents. Over the years a bunch of applications have decided to set up shop there. I don’t understand this.

On Mac OS X, in addition to My Documents, there is “Application Support” or something of that sort. If your Application needs to store stuff, put it there. Applications should not be allowed to rent space in My documents folder without my permission.

Here are the current offenders:

  • AdobeStockPhotos (I don’t use this feature)
  • Updater (why does Adobe feel they need to create this folder here?)
  • My Data Sources
  • My Shapes (I don’t have any shapes)
  • My Web Sites (I don’t have any web sites)
  • … there are more but I have since deleted them and they have not returned …

At the very least, programs that create this folders on install/first boot should change their behavior to create them on first use of the functionality.

Actually, I just found this guideline from Apple. I wish Windows had something like this. Back in MacBU the Testers were rabid about filing bugs whenever we violated any of the Apple Human Interface Guidelines. I learned and memorized almost all of them real fast… I wish we provided, enforced, and even followed something similar.

Support Files

A support file is any type of file that supports the application but is not required for the application to run. Document templates and sample files are simple examples of support files. However, you might store more application-bound information, such as custom configurations or preset data files for your application’s workspace. In these instances, the information is intrinsically tied to a specific application (as opposed to the user’s data) but is not essential for the application to run.

The preferred location for nearly all support files is in the Application Support directory of the appropriate domain. Which domain you choose to store your support files depends on the intended use of those resources. If the resources apply to all users on the system, such as document templates, place them in /Library/Application Support. If the resources are user-specific, such as workspace configuration files, place them in the current user’s ~/Library/Application Support directory.

Within the Application Support directory, you should always place support files in a custom subdirectory named for your application or company. Normally, you should use the application name, but you might want to use your company name if you have multiple products that share many of the same resources. How you organize the resources in this custom subdirectory is entirely up to you.

Even if a support file is user-specific, your application should not have any trouble accessing it from multiple user sessions. Because of fast user switching and remote logins, it’s possible that the same user could be logged into the computer more than once. Support files should not contain any data that would adversely affect the behavior of multiple user sessions. All sessions should see the exact same behavior.

And of course there is this gem:

Don’t Pollute User Space

It is important to remember that the user domain (/Users) is intended for files created by the user. With the exception of the ~/Library directory, your application should never install files into the user’s home directory. In particular, you should never install files into a user’s Documents directory or into the /Users/Shared directory. These directories should only be modified by the user.

Even if your application provides clip art or sample files that the user would normally manipulate, you should place those files in either the local or user’s Library/Application Support directory by default. The user can move or copy files from this directory as desired. If you are concerned about the user finding these files, you should include a way for the user to browse or access them directly from your application’s user interface.

 

Monday, February 27, 2006 11:55:21 PM (Pacific Standard Time, UTC-08:00)
If I'm right, users don't have permission to install applications to %ProgramFiles%. Where else should "zero footprint" applications get installed to?
RichB
Tuesday, February 28, 2006 12:32:57 AM (Pacific Standard Time, UTC-08:00)
I remember an application called Microsoft Entourage that puts a "Microsoft User Data" folder into my Documents folder on Mac OS X (and AFAIK, this is the only OS X application that puts its mail database there ;-) No internet browser puts my bookmarks there, no other mail application puts its data there - it also does not belong there.

Moreover, I think on Windows, more applications might use other locations if there was an _obvious_ concept of a user home folder. The files we are talking about are files that e.g. the user will want to backup if he moves to another machine or if he reinstalls Windows onto a blank hard drive, so Microsoft will have to introduce some home folder structure with a dedicated location where user data from applications and preferences will be stored. Basically, all of these data have to be stored in consistent locations on a per-user basis. Educate your developers to do that and give those locations proper, human-readable names and make them easy to locate, and make it easy to locate all of them at once, so that they can be backed up easily and the restore operation restores really all the user data of an app at once. Windows has been moving into the right direction in that regard, but at least your developers are not quite there...
Ralph
Tuesday, February 28, 2006 5:06:28 AM (Pacific Standard Time, UTC-08:00)
AMEN!
Tim
Tuesday, February 28, 2006 5:15:22 AM (Pacific Standard Time, UTC-08:00)
I completely agree that abuse of my documents is out of control. It's gotten so bad I've resorted to applying +HS attributes to these folders that won't go away.
Tuesday, February 28, 2006 5:57:49 AM (Pacific Standard Time, UTC-08:00)
Ralph - %userprofile%\*.*. Or if you prefer, any of the results of ShGetFolderPath.

The real issue is that Adobe is run by sadistic, retarded chimpanzees. There's plenty of other evidence for that other than their use of folders.
Tuesday, February 28, 2006 7:30:05 AM (Pacific Standard Time, UTC-08:00)
%userprofile%\AppData and %userprofile%\Local Settings\AppData are better matches for ~/Library/Application Support - replace %userprofile% with All Users and you get /Library/Application Support on Windows. Anyway, yes, if I recall correct the XP Logo Guidelines thing already mentions this.

Side note: Why have the comments such a rediculous small font size? Having to perform an additional click to read comments for an entry does already emphasize the 3rd party nature of the comments...
Tuesday, February 28, 2006 9:59:33 AM (Pacific Standard Time, UTC-08:00)
Windows is pretty good with this, but it has not been so clearly emphasized to developers that they are not to touch My Documents.

I would like to see something like a top level user folder (not the profile folder) with Documents, Music, Videos, etc. sub-folders. Applications can create their own annoying folders in that top-level folder but should not touch, e.g., Documents. That is similar to the Mac and I believe Vista may be doing it too.
Tuesday, February 28, 2006 1:00:56 PM (Pacific Standard Time, UTC-08:00)
Another frakkin' annoying thing is how most games put their save games/etc. now in "My Documents"; at least Microsoft puts them in a sub-folder ("My Games") -- some other companies just create a folder with the game name. And to top it off, they feel the need to dump not only save games, but sometimes hundreds of megs of data files *cough*Battlefield2*cough*. This completely sucks when your documents folder is on a share over the network..
Tuesday, February 28, 2006 2:24:44 PM (Pacific Standard Time, UTC-08:00)
@Dan: I was talking about an obvious, user-serviceable and _friendly_ concept. To see what I really mean, take a look at Mac OS X, the /Users folder and its structure for each user, and also look how easy it is to find user-specific data on that platform, how easy it is to backup and restore that data and how much data you need beyond that in order to have all your data available when moving to a new machine. The Apple Migration Assistant and all concepts related thereto is something that is _miles_ ahead of Windows' data handling, really.

I also still fail to understand why Microsoft is doing this with Office / Entourage on the Mac. Really, it's basically the same thing. That data also does not belong into Documents...
Ralph
Friday, April 07, 2006 12:18:41 AM (Pacific Standard Time, UTC-08:00)
On Mac, you can go into Adobe Bridge and change the location for the AdobeStockPhotos folder (damn them for putting it there in the first place). Presumably it's the same on Windows?

Now just need a way to move the Updater folder...
Tom
Friday, December 28, 2007 12:54:31 AM (Pacific Standard Time, UTC-08:00)
You can get rid of "Microsoft User Data" residing in your Documents folder.

This tip worked for me. (forums.macnn.com)

More alternatives here. (macosxhints.com)

Now, if only Adobe would provide a similar way of getting rid of its folders..
Friday, December 28, 2007 2:13:00 AM (Pacific Standard Time, UTC-08:00)
Ah, that's right.. this was Windows only. Well maybe the previous, OS X related comment is useful for someone..
Saturday, January 12, 2008 8:39:22 AM (Pacific Standard Time, UTC-08:00)
I agree too.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Live Comment Preview