Microsoft’s Windows Vista operating system includes support for widgets on every desktop. Windows widgets are permanently docked in a sidebar, providing up-to-date information and easy access to small tasks throughout the day. In this article I will walk you through the major components of a Windows Vista Sidebar gadget including major differentiating features, best practices, and tips for widget packaging and distribution.
Note: Microsoft calls its widgets “gadgets” in an attempt to avoid more legal battles with Apple. I refer to Microsoft Gadgets for Windows Vista Sidebar as simply “widget” throughout the article to keep things simple.
The short version
Windows Vista Sidebar gadgets are mini-applications powered by familiar web technologies. The Sidebar has three main views and user interactions — docked, flyout, and floating — for rich widget interactions. Your widgets are downloaded to the user’s desktop, unpacked, and executed in a local machine trusted state. With great power comes great responsibility, and you will want to take a few extra steps to make sure your widget is seen as a trusted part of the user’s daily computing environment. Now on to the good stuff.
Distribution and market share
Windows Vista is the most recent edition of the Windows line of operating systems. Widgets are an included feature on every version of Windows Vista running on a computer with over 512 MB of RAM (Vista Capable).
Microsoft released Windows Vista worldwide on January 30, 2007 and was immediately included as the default operating system pre-installed on sales of new PCs. Market share numbers are always a bit fuzzy, but web analytics firm Net Applications observed a 8% market share for Windows Vista in October 2007. Vista’s current market share is significantly behind Windows XP’s 79% and only 1.4% above Mac OS X but continuously climbing as individuals and businesses purchase new computers.
Each new copy of Windows Vista displays an analog clock, photo slide show, and a miniature feed reader in Sidebar by default. Sidebar holds 5 widgets, leaving two spots open for your new content even if the user does not understand how to remove the defaults. Vista also ships with address book, calendar, CPU meter, currency convertor, notes, picture puzzle, stocks, and weather widgets pre-installed for easy customization. Users discover and install new widgets through Windows Live Gallery.
Widget execution and privileges are very similar to HTML Applications (HTAs) on the Windows platform. Your widget is rendered by MSHTML, one of the main components of Internet Explorer 7. Your widget is a packaged set of resources living inside the user’s applications directory and executes within a Local Machine Zone.
Three widget views
A Windows Vista Sidebar widget has three main data views: docked to the sidebar, docked to the sidebar with an adjacent data fly-out, and a free-floating window on the user’s desktop. A successful widget should take advantage of all three use-cases to provide the best possible experience on the Vista platform.
A docked widget sits in an always visible sidebar. Users might glance at information throughout the day (e.g. current weather or a stock price), execute a quick task (e.g. jot down a quick note or execute a search), or take a quick break (e.g. solve a sudoku or picture puzzle). A docked widget is 130 pixels wide and at least 60 pixels tall.
Docked with flyout
A gadget can expand and provide relative, contextual information through the use of a flyout. A flyout is connected to your docked gadget but expands into the space adjoining the sidebar when a user takes action. You might display extended information in this space such as a detailed weather report, include additional context such as a stock trading chart (pictured above), or display a full media file such as a large photo or video. A widget flyout adds rich interaction directly inside the widget view without spawning a new browser window or other complex actions.
A floating widget detaches from the Sidebar and instead floats on the user’s desktop. Floating widgets can display more information than a desktop widget by expanding up to 400 pixels square (about a 3x increase over the sidebar’s 130 pixels). A user can choose to always have your floating widget on top of all other application windows but will most likely access your floating widgets content as a heads-up-display by specifically engaging the Sidebar application through a click or keystroke.
Image and text handlers
The Windows Sidebar g namespace helps you create background images, place text, and resize images from a DOM scriptable interface. Image helpers provide quick and easy resizing of any image asset using Vista’s built-in thumbnail tools. The GIMAGE protocol resizes and caches local images less then 256 pixels square in a much more efficient manner than a typical img element.
Access system information
Windows Vista connects Sidebar gadgets to other parts of the operating system through a special
System interface provides easy access to current machine status (e.g. CPU and memory utilization), address book contacts, e-mail messages, or even the Windows Shell. Developers can take advantage of VBScript or ActiveX for custom functionality.
Windows Vista Sidebar gadgets are distributed as a zipped archive, Windows cabinet file, or a Windows Installer 4.0 file. Each format offers its own simplicity and trust levels. You’ll need to make a few key install decisions based on your trust concerns, the features of your widget, and budget.
The ZIP file format is a widely distributed compression format with compression and decompression tools present on all major operating systems. A widget publisher should simply place all widget assets in a single folder and compress its contents using their favorite ZIP compression tool. Your newly created archive should be renamed with a .gadget extension for easy recognition and handling by the Vista operating system. Vista will examine your package and decompress its content into the user’s Sidebar gadget folder.
Note: Windows Vista Sidebar gadgets should have a MIME type of application/x-windows-gadget and not application/zip. Setting the right MIME type on your server provides the appropriate desktop hooks to make sure your widget makes it beyond a download folder and into the Sidebar.
Windows cabinet files allow publishers to digitally sign a Vista gadget for a more trusted install process. You are no longer an Unknown Publisher with a red warning shield possibly making your users think twice about installing your desktop gadget. Signed gadget publishers are mentioned by name on the install screen with a link back to their website for further information. Signed gadgets receive a yellow warning shield and an upgraded warning message of only “potentially” harming the user’s computer.
Windows digital signatures are more expensive than a free compression tool but do add some user comfort and trust during the install process. If you are a big company with thousands of downloads such as eBay or Netflix you might even already have Windows signature file assigned to your organization. If not you may want to evaluate total costs on a per-install basis and factor in a larger adoption rate for a signed gadget.
Windows Installer can unpackage your cabinet file and execute a few other setup tasks to make sure the user’s computer is properly configured for your gadget. If you need to make sure the user’s registry settings allow ActiveX execution or accessing data from multiple domains you will need to use a Windows Installer to properly configure the machine for your gadget.
Windows Sideshow connects Vista PCs to peripheral device displays such as a digital picture frame, television remote controls, or your intelligent refrigerator. Do you not have a refrigerator that connects to Windows computers on the network for the latest weather updates and new recipes? Sideshow is a very early-stage concept that might have adoption rates somewhere between a MSN Direct refrigerator magnet and a Tablet PC but is worth a mention when discussing Vista gadgets.
Vista Sidebar gadgets can be extended for use with Windows Sideshow. Many Sideshow devices are powered by the NVIDIA PREFACE platform so if you are really serious about creating widgets for a remote control or refrigerator you might program directly against the PREFACE features (formerly PortalPlayer).
Windows Vista Sidebar gadgets take advantage of the web browser, desktop scripting, rich graphics process, and multimedia capabilities of Microsoft’s latest operating system. The always-on sidebar is an attractive marketing space for widget content and a quick way to provide up-to-date information to your Windows users. The Sidebar’s prime real estate only supports about 5 widgets, so you’ll have to execute well and earn your coveted spot on your target users’ permanent screen.
Sidebar gadgets are lightweight applications coded using Web technologies already familiar to most developers. You can quickly build a simple connected gadget inside a mini HTML page or Flash Player runtime but a full-featured integration will provide a deeper engagement and more gadget views over time by taking advantage of the full features of the Windows Vista gadget platform.