Understanding Windows 7 Libraries

This is the second post in a series of posts about Windows 7 Libraries. This post describes some of the rationale that drove Windows 7 Libraries functionality, and explores the new features and opportunities we, as developers, have with Windows 7 Libraries.

What Libraries mean for users in Windows 7?

To better understand the concept of Libraries in Windows 7, we need to look back to the time before Windows 7. Earlier version of Windows like Windows Vista and XP, included sets of special folders for storing user’s content such as “My Documents” and “My Pictures.” In Windows Vista, these special folders where automatically indexed to allow users to perform faster more efficient searches on their content. Even so, many users, me included, store their files, music, and pictures all over the PC in various folders like c:\temp, d:\Birthday2008\pictures, or even in remote storage. We refer to this as storing data outside the user’s profile storage space. This affects the indexing and therefore the entire search experience, and often sends the user on a small quest to try to find their content.

So, in Windows 7, Libraries tries to address the problem of users' content stored all over the PC by allowing users to have full control over their “Documents Library” folder structure. Meaning that in Windows 7, users can define which folders to include in the Documents Library. This is true for any Library. Therefore, we can say that Libraries are user-defined collections of content. By including folders in Libraries, the user is telling Windows where his important data is located. The system will index folders, to enable fast searching and stacking based on file properties.

In Windows 7, users will go to Libraries in order to manage their documents, music, pictures, and other files. As you can see in Windows Explorer and the Common File Dialog, Libraries are an integral part of the Windows Shell. This integration is very important because it enables users to browse their files the same way they would in a folder, which means there is no new behavior to learn. Clicking on the Documents Library shows you your documents. Moreover, due to the fact that libraries are integrated into the Windows Shell, users can perform searches and filter results by properties like date, type, and author in both Windows Explorer and the Common File Dialog. In other words, by using libraries, users get to enjoy storage that is both flexible and indexed. The following image displays the integration of several folders into a single library view and the rich search and pivots  of Windows Explorer in Windows 7.

Win7_libraries

So what is a library?

In many ways, a Library is similar to a folder. As we mentioned before, when users open a Library, they can see one or more files or folders. However, unlike a folder, a Library can display files that are stored in several folders at the same time. This is a subtle, but important, difference. Libraries don't actually store items. They monitor folders that contain a user’s items, and provide a single access point and rich view pivots (by file Type, date or author) of this aggregated content. Libraries promote a user’s data and let the file system fade into the background.

The Windows 7 default Libraries setting has one main Library called “Libraries” that contains four predefined default Libraries: Documents, Music, Pictures, and Videos. Users can save and copy files directly to a library, even if we said that libraries are not file system folders, since every library has a default save location to send these files to. Each library contains two physical file locations, the user's personal folder (this is the default Known Folder that is included in a library, for example, My Documents in the Documents Library), and the public folder For custom categories, the default save location is the first folder added. Users may change the default save location of a library at any point, but if they remove the default save location, the system selects the next folder in the library as the new save location. In addition, users can save to any folder they have permissions to that are included in a library.

For folders to be successfully added to a library, they must be capable of being indexed on the local machine, indexed on a remote Windows machine, or on a server with files indexed by Windows Search. In order to maintain the high standards for the Windows Shell search experience, users can’t add folders that are not indexed into a folder.

What more do developers need to know about Libraries?

After understanding what Libraries are, developers need to understand how they can support and use Libraries in their applications. This is important because by using Libraries, users inform Windows where their important data is. This allows you, as developer, to access a user's Library and consume its contents, removing the need maintain your own set of data storage for your application.

You can also use the new IShellLibrary API to empower your applications to manipulate libraries. This can help ensure that applications remain in sync with user files and Windows since any change made to a library structure will be reflected in the application that is monitoring that library – giving us developers great power and great responsibility.

In the next post, we will cover the underlying architecture of libraries and dive deeper into the API.


Comments

  1. Posted on: April 17, 2009 at 3:02PM  

    In using libraries it looks like both the end user and the application still needs to be aware of the actual folder name used for file storage. I'm having trouble seeing any benefit for end users or applications. It looks like the library name is just a somewhat more complicated parent folder.

  2. Posted on: May 02, 2009 at 6:28AM  

    The Win7 beta libraries were great; I could add all my music directories. Strangely enough the Win7 RC libraries are entirely useless; it refuses to add folders saying "this network location can't be included because it's not indexed".

    One step forward, two steps back.

  3. Posted on: May 13, 2009 at 1:17AM  

    Library should give user the option to add not only folders but specific files/files based on *.jpg  or a*.* or open???.doc like that so that we can involve files in a library which I need.

    For example I love to collect font ... So i can make a font library ... with its contents as *.ttf, *.otf ... etc. The library should ask user the option to give the folders from which such files have to be included. One can select say download folder, or some may select E: DRIVE or some may select entire computer.

    These files may remain in other folders but when I open the library they should be visible together.

    This will also help in maintaing different college project libraries with different files, some files may be common to other libraries also.

    Also the possibility to include files based on tags.

  4. Posted on: May 13, 2009 at 5:53AM  

    SaptarshI: Your font library could be achieved in a couple of ways.

    1. Simply create a top level Fonts library that includes all the folders where you keep fonts. Any font application that browses that library will only see the font files if its open file mask is set appropriately.

    2. Create a Saved Search and put it in your Favorites.

  5. Posted on: May 20, 2009 at 7:20PM  

    Overall, I think W7 RC is fantastic and I think Libraries are a good idea and will be useful, albeit somewhat awkward and confusing at times, especially the way they are currently implemented.

    The main problem I am having with the Library feature as currently implemented in the RC is that one cannot customize the various folder Views in the library independently of the Root Library folder.   So, for example, the library folder "Pictures" and the sub folders contained under Pictures all currently have to have the same View settings.  This is a big design defect, imo.

    For example, I would like to view the Library root folder Pictures in a List view because I have a lot of content displayed there and don't need to see large numbers of HUGE icons that I have to scroll through to find what I'm looking for.  But I would like to see the sub folders grouped under the root folder "Pictures"  2 levels down in the LARGE ICON view so I can see the actual Thumbnails of my photos when I am at that level in the Pictures library.  The way you have it set up now, if I change the subfolder view, it changes the root library folder view and vice versa.  So I cannot customize the view of these folders separately as I would like.  I find this very frustrating and an impediment to using and enjoying the Library functionality.

    I would sugjest and request that you implement this added customizability of allowing users to set and retaining independent views for library folders and subfolders.  If this cannot be done, perhaps you should consider implementing a way for users to disable the library function entirely.

    (OT, a big thanks for putting back the easy way from XP to customize the size of the space consumed by system restore.)

  6. Posted on: May 20, 2009 at 7:27PM  

    In the library function, please add the ability for the user to set different views for the root folder (e.g., pictures) and the various subfolders.  I would like to be able to view the root folder Pictures in the Small Icon or List view because I have a lot of content and don't need to scroll through miles of HUGE large icons at that folder level.  But 2 levels below the Pictures folder, I have folders of photos I would like to have always open up in the LARGE ICON view so I can see the actual thumbnails.  But if I change the view at the Library subfolder level, then the Root Library folder view also changes back to HUGE Icons again.  Please provide the USER with the ability to set the view for each of these Library folders and subfolders independently of each other.

    OT:  Thanks for putting back an easy graphical way (from XP) for the user to set the size of the space allocated to system restore.  And great job overall so far on W7.

  7. Posted on: May 20, 2009 at 7:28PM  

    In the library function, please add the ability for the user to set different views for the root folder (e.g., pictures) and the various subfolders.  I would like to be able to view the root folder Pictures in the Small Icon or List view because I have a lot of content and don't need to scroll through miles of HUGE large icons at that folder level.  But 2 levels below the Pictures folder, I have folders of photos I would like to have always open up in the LARGE ICON view so I can see the actual thumbnails.  But if I change the view at the Library subfolder level, then the Root Library folder view also changes back to HUGE Icons again.  Please provide the USER with the ability to set the view for each of these Library folders and subfolders independently of each other.

    OT:  Thanks for putting back an easy graphical way (from XP) for the user to set the size of the space allocated to system restore.

  8. Posted on: August 11, 2009 at 9:44PM  

    Hi. We have noticed a problem when upgrading from Vista SP1 to Windows 7.

    Problem description: In our product (Firewall) we are using NDIS driver. The driver is installed using INF and catalog file that is signed by Microsoft (after passing the WHQL certification). All works fine until we upgrade from Vista sp1 to Windows 7. We noticed that the driver (after the upgrade) is not installed. Seems like some problem in the upgrade (silent install of NDIS does not work properly maybe?)

    Would appreciate your help.

  9. Posted on: August 11, 2009 at 9:45PM  

    Hi. We have noticed a problem when upgrading from Vista SP1 to Windows 7.

    Problem description: In our product (Firewall) we are using NDIS driver. The driver is installed using INF and catalog file that is signed by Microsoft (after passing the WHQL certification). All works fine until we upgrade from Vista sp1 to Windows 7. We noticed that the driver (after the upgrade) is not installed. Seems like some problem in the upgrade (silent install of NDIS does not work properly maybe?)

    Would appreciate your help.

  10. Posted on: August 28, 2009 at 6:21AM  

    I've found a workaround for the "this network location can't be included because it's not indexed" issue.

    1. Open Windows Media player and manage one of the built in libraries such as “Videos”. (Don’t use the Recoded TV as that will cause issues with step 2)

    You will find that you can add any network location you want with no error message re indexing.

    2. Then close Media Player and go back to the explorer view of Libraries, you will then find that the video's library has any none indexed network locations that you added via Media Player.

    3. You can them make a copy of the Video Library and rename it to something more pertinent to the data it contains.

    You don’t get benefits of indexing etc doing this, but it’s really useful to have all your data locations together. Maybe this is something MS could consider?

  • Page:
  • 1
  • 2
  • 3

Trackbacks

  1. Posted by: Windows 7 for Developers on April 06, 2009 at 7:38PM

    Libraries are the primary entry points to user data in Windows 7. They are the natural evolution from

  2. Posted by: Windows 7 Libraries .NET Sample Library ??? an Overview | Windows Seven 7 on April 06, 2009 at 8:19PM

    Pingback from  Windows 7 Libraries .NET Sample Library ??? an Overview | Windows Seven 7

  3. Posted by: Understanding Windows 7 Libraries - Windows 7 for Developers - The … | Current Technology Updates daily on April 06, 2009 at 9:27PM

    Pingback from  Understanding Windows 7 Libraries - Windows 7 for Developers - The … | Current Technology Updates daily

  4. Posted by: Understanding Windows 7 Libraries - Windows 7 for Developers - The … | networking-the.info on April 06, 2009 at 10:41PM

    Pingback from  Understanding Windows 7 Libraries - Windows 7 for Developers - The … | networking-the.info

  5. Posted by: Tech News, Resources from Blogosphere - 07 April 09(6) | Best Webhosting on April 06, 2009 at 10:47PM

    Pingback from  Tech News, Resources from Blogosphere - 07 April 09(6) | Best Webhosting

  6. Posted by: Tech News, Resources from Blogosphere - 07 April 09(6) | HintPoint on April 06, 2009 at 11:36PM

    Pingback from  Tech News, Resources from Blogosphere - 07 April 09(6) | HintPoint

  7. Posted by: Understanding Windows 7 Libraries - Windows 7 for Developers - The … | www.windows7vista.com on April 07, 2009 at 1:33AM

    Pingback from  Understanding Windows 7 Libraries - Windows 7 for Developers - The … | www.windows7vista.com

  8. Posted by: Windows 7 Libraries - Overview on April 07, 2009 at 3:29AM

    Pingback from  Windows 7 Libraries - Overview

  9. Posted by: Windows 7 Libraries | Windows 7 News on April 07, 2009 at 5:01AM

    Pingback from  Windows 7 Libraries | Windows 7 News

  10. Posted by: Understanding Windows 7 Libraries « zK++ Blogosphere on April 07, 2009 at 5:41AM

    Pingback from  Understanding Windows 7 Libraries « zK++ Blogosphere

  11. Posted by: Dew Drop - April 7, 2009 | Alvin Ashcraft's Morning Dew on April 07, 2009 at 7:30AM

    Pingback from  Dew Drop - April 7, 2009 | Alvin Ashcraft's Morning Dew

  12. Posted by: You Get The . Info » Windows 7 Libraries .NET Sample Library ??? an Overview - 22th Edition on April 07, 2009 at 8:17AM

    Pingback from  You Get The . Info » Windows 7 Libraries .NET Sample Library ??? an Overview - 22th Edition

  13. Posted by: Understanding Windows 7 Libraries|Join Our Story!|AngNetwork Blog on April 07, 2009 at 2:35PM

    Pingback from  Understanding Windows 7 Libraries|Join Our Story!|AngNetwork Blog

  14. Posted by: Les Actualites » Windows 7 Libraries on April 07, 2009 at 3:17PM

    Pingback from  Les Actualites  » Windows 7 Libraries

  15. Posted by: Windows 7 Libraries .NET Sample Library ??? an Overview | Windows 7 Information, News, Downloads, Support Forums on April 07, 2009 at 4:03PM

    Pingback from  Windows 7 Libraries .NET Sample Library ??? an Overview | Windows 7 Information, News, Downloads, Support Forums

  16. Posted by: Windows 7 Libraries on April 08, 2009 at 11:56AM

    Pingback from  Windows 7 Libraries

  17. Posted by: Windows 7 Library feature : Understanding and Use - Windows 7 on April 09, 2009 at 10:15PM

    Pingback from  Windows 7 Library feature : Understanding and Use - Windows 7

  18. Posted by: Windows 7 Libraries explained | win7connect - A website dedicated to Microsoft Windows 7 on April 12, 2009 at 3:01PM

    Pingback from  Windows 7 Libraries explained | win7connect - A website dedicated to Microsoft Windows 7

  19. Posted by: RSS Weekly Digest - #2 on April 14, 2009 at 6:59AM

    Pingback from  RSS Weekly Digest - #2

  20. Posted by: RSS Weekly Digest - #2 on April 14, 2009 at 6:59AM

    Pingback from  RSS Weekly Digest - #2

  21. Posted by: Windows 7 for Developers on April 14, 2009 at 1:38PM

    By now, you should have a better understanding of what Windows 7 libraries represent and how they can

  22. Posted by: Libraries Under the Hood | Windows Seven 7 on April 14, 2009 at 2:25PM

    Pingback from  Libraries Under the Hood | Windows Seven 7

  23. Posted by: Links for April 14, 2009 « Steve Mullen’s Blog on April 14, 2009 at 3:35PM

    Pingback from  Links for April 14, 2009 « Steve Mullen’s Blog

  24. Posted by: linkfeedr » Blog Archive » Libraries Under the Hood - RSS Indexer (beta) on April 14, 2009 at 4:08PM

    Pingback from  linkfeedr » Blog Archive » Libraries Under the Hood - RSS Indexer (beta)

  25. Posted by: Understanding Windows 7 Libraries « Central Blogosphere on April 14, 2009 at 6:50PM

    Pingback from  Understanding Windows 7 Libraries « Central Blogosphere

  26. Posted by: Libraries Under the Hood | Windows 7 Information, News, Downloads, Support Forums on April 15, 2009 at 8:32AM

    Pingback from  Libraries Under the Hood | Windows 7 Information, News, Downloads, Support Forums

  27. Posted by: linkfeedr » Blog Archive » Light Up with Windows 7 Libraries - RSS Indexer (beta) on April 16, 2009 at 6:07PM

    Pingback from  linkfeedr  » Blog Archive   » Light Up with Windows 7 Libraries - RSS Indexer (beta)

  28. Posted by: Light Up with Windows 7 Libraries | Windows Seven 7 on April 16, 2009 at 6:12PM

    Pingback from  Light Up with Windows 7 Libraries | Windows Seven 7

  29. Posted by: Light Up with Windows 7 Libraries | Windows Seven 7 on April 16, 2009 at 6:12PM

    Pingback from  Light Up with Windows 7 Libraries | Windows Seven 7

  30. Posted by: Windows 7 Troubleshooting Packs « On-Site Computer Services, Inc. in New Orleans Blog 504-469-6991 on April 17, 2009 at 8:44AM

    Pingback from  Windows 7 Troubleshooting Packs « On-Site Computer Services, Inc. in New Orleans Blog 504-469-6991

  31. Posted by: Light Up with Windows 7 Libraries | yoursoftwarelink.com on April 17, 2009 at 8:37PM

    Pingback from  Light Up with Windows 7 Libraries | yoursoftwarelink.com

  32. Posted by: Technology Info » Light Up with Windows 7 Libraries on April 18, 2009 at 7:03AM

    Pingback from  Technology Info  » Light Up with Windows 7 Libraries

  33. Posted by: Windows 7 Libraries Truely Enhance Your Experience | Windows 7 Resource Center on April 18, 2009 at 2:18PM

    Pingback from  Windows 7 Libraries Truely Enhance Your Experience | Windows 7 Resource Center

  34. Posted by: Windows 7 will be fun at fishbrains - Bret Fisher on April 20, 2009 at 5:28AM

    Pingback from  Windows 7 will be fun at fishbrains - Bret Fisher

  35. Posted by: Windows 7 for Developers on April 23, 2009 at 6:16PM

    This is the fifth post about Windows 7 Libraries. By now, you should be familiar with Windows 7 Libraries

  36. Posted by: Consuming the Contents of Windows 7 Libraries | Windows Seven 7 on April 23, 2009 at 7:08PM

    Pingback from  Consuming the Contents of Windows 7 Libraries | Windows Seven 7

  37. Posted by: Consuming the Contents of Windows 7 Libraries | Windows 7 Information, News, Downloads, Support Forums on April 24, 2009 at 12:08AM

    Pingback from  Consuming the Contents of Windows 7 Libraries | Windows 7 Information, News, Downloads, Support Forums

  38. Posted by: linkfeedr » Blog Archive » Consuming the Contents of Windows 7 Libraries - RSS Indexer (beta) on April 24, 2009 at 7:11PM

    Pingback from  linkfeedr » Blog Archive » Consuming the Contents of Windows 7 Libraries - RSS Indexer (beta)

  39. Posted by: US ISV Developer Evangelism Team on April 25, 2009 at 5:37PM

    The release candidate (RC) for Windows 7 is just around the corner. Dates for the Windows 7 RC were announced

  40. Posted by: Microsoft gets it right with Windows 7 | Andrew Kantor's Place on April 26, 2009 at 8:10PM

    Pingback from  Microsoft gets it right with Windows 7 | Andrew Kantor's Place