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 06, 2009 at 11:39PM  

    Why did you have to introduce a new technology? This could all be done with NTFS Junctions (with a little enhancement for remote folders). Now developers will have to learn a whole new technology that has fewer use cases than junctions.

    For example the "Pictures" library would be a folder with the "My Pictures" folder inside it and a junction to "Public Pictures" and "My Pictures (D:)".

  2. Posted on: April 07, 2009 at 12:17AM  

    PRab - please wait for the next two posts

  3. Posted on: April 07, 2009 at 12:18AM  

    I do hope with the libraries functionality of Win7, that you folks clean up the mess of user folders found in Vista and Server08..

    I've often written batch files to undertake profile backups, and have tripped over more than once with the recursive symlinks (which are hidden in explorer view) found beneath the AppData folder in particular.. These VERY VERY long directory structures then cause grief when trying to purge copied files indicating a source path <recycle bin> address being too long to delete these..

    Directory listings like:

    New File 180 reader9rdr-en_US_meta.txt

     0% 100% New Dir 0 C:\Users\User1\AppData\Local\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Adobe\Updater6\Install\

    New Dir 0 C:\Users\User1\AppData\Local\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Adobe\Updater6\Install\AdobeUpdater\

    & Further down the log

    New Dir 12 C:\Users\User1\AppData\Local\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Microsoft\Windows\WER\ReportQueue\Report0f087739\

    New File 205 75003502.od

     0% 100%

    **

    Are not uncommon, and there's also the issue of

    C:\Users\User1\Documents\ and the symlink

    C:\Users\User1\My Documents\

    and likewise

    C:\Users\User1\Music and

    C:\Users\User1\Documents\My Music

    causing grief with scripts and duplicate copies of data - I'd be happy to forward through more info if required about this issue.. I just don't know who/which email to point this too..

  4. Posted on: April 07, 2009 at 5:23AM  

    Yochay - I hope you cover the bizarre and somewhat inflexible interactions of the Windows 7 libraries with Windows Media Player. I detailed some of these in my comments on your post "Windows 7 .NET Interop Sample Libraries"

  5. Posted on: April 07, 2009 at 6:48AM  

    Libraries are a nice feature but they were dropped in Vista so it was natural to have them in Windows 7. It'd have been even better if Windows Explorer was enhanced to support navigation to and from NTFS junction points, hardlinks, symlinks instead of giving an error. So long overdue.

  6. Posted on: April 07, 2009 at 6:54AM  

    @Yochay Kiriaty - Looking forward to it. I haven't looked at the underlying technology, but from the outside it looked like a reinvention of the wheel. I really hope it isn't. Overall, great job on Windows 7.

  7. Posted on: April 07, 2009 at 6:12PM  

    The "WINDOWS CLASSIC" VIEW for folders, menues, etc

    is my choice, by design, for ease of use, efficiency, and

    of course "$productivity". I do not want the eye-candy and

    0-wow graphics: it seems a distraction and I still have to read the words. I delete the "My..." folders and use more functional names like; MUSIC and MUSIC-DOWNLOADS.

    What kind of user prefers scrolling through all those icons

    when the XP "details-list view is easier, faster, accurate ?

    Some resources for time motion studies and surveys of

    commercial and institutional users would be more usefull

    than pushing the product. Recall "A good product

    at the right price will sell itself." as did XP and 98SE.

  8. Posted on: April 09, 2009 at 9:22AM  

    Windows 7 includes a number of new features, such as advances in touch, speech, and handwriting recognition, support for virtual hard disks, improved performance on multi-core processors, improved boot performance, and kernel improvements.Windows 7 adds support for systems using multiple heterogeneous graphics cards from different vendors (Heterogeneous Multi-adapter), a new version of Windows Media Center,a Gadget for Windows Media Center, improved media features, the XPS Essentials Pack and Windows PowerShell being included, and a redesigned Calculator with multiline capabilities including Programmer and Statistics modes along with unit conversion.Many new items have been added to the Control Panel, including ClearType Text Tuner, Display Color Calibration Wizard, Gadgets, Recovery, Troubleshooting, Workspaces Center, Location and Other Sensors, Credential Manager, Biometric Devices, System Icons, and Display. Windows Security Center has been renamed to Windows Action Center (Windows Health Center and Windows Solution Center in earlier builds) which encompasses both security and maintenance of the computer.Nice Blog.

    Tom

    Office Jobs

    Jobs in the Office

    Office Jobs Advice

    Information for Office Jobs

  9. Posted on: April 10, 2009 at 4:42PM  

    In response to Duro and other similar comments: Libraries are the new entry point for the users’ data and as such they represent a collection user folder. We hope that with Libraries, users will include folders that until Windows 7 where left out of the game and were less accessible to the indexer. As a result of including all your content under the library system, it will be much easier to back up ALL your content. With that said, libraries do not address the management of the user’s profile “metadata” that is found in the other user storage space like App Data. Data stored in the App Data is very important data for the integrity of the user profile, but it is not viewed by the library system as a user data like pictures, music or documents.  In order to back up such data, libraries the best system to use, since you can use either the Shell programming model or the new IShellLibrary API to enumerate the entire contents of a library and you need not care about the specific internal structure.

    In future post we will address these issues.

  10. Posted on: April 13, 2009 at 7:24AM  

    Option to hide subfolders in library

    Libraries could probably be nice for gaining more independence from the hierachical organization, but then subfolders shouldn't be displayed. At least we should have the option to hide them.

    Best option for users would be that they could decide to display folders in the library or not by clicking an Attibute in Properties (like hidden or read only).

  • 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