Contents Index Topic Contents | ||
Previous Topic: Netcaster CDF Compatibility Notes Next Topic: Creating Software Update Channels |
Creating Active Desktop Items
The Microsoft® Internet Explorer 4.0 Active Desktop is capable of hosting any HTML item, such as Web pages, Java applets, ActiveX Controls, floating frames, and images. With this technology, users can create a highly customized environment that automatically brings their favorite Web content to the desktop. Web publishers can leverage their existing tools and production processes to enhance their Web content with Dynamic HTML support. The resulting integration of the desktop and the Web benefits users through an enhanced and easier Web experience. Web publishers also benefit from the increased presence in the users' working environment.
For the latest information about Active Desktop items, refer to the list of Frequently Asked Questions (FAQ) in the Internet Client SDK.
Overview: Active Desktop and Active Channels
Publishing Information on the Active Desktop
Active Desktop Item Development Guidelines
How to Develop an Active Desktop Item
Overview: Active Desktop and Active Channels
Until now, the primary target for Web-based content has been the browser window. Most Web publishers today are forced to optimize their content to fit into a medium-sized browser window, based on the default window size of the browser. Internet Explorer 4.0 opens new opportunities for content by enabling your content to grow beyond the browser window, in two directions at once. The first direction lets you offer your customers a more focused browsing experience by taking over the entire screen, minimizing most of the "chrome" (toolbars) surrounding your content, and taking full advantage of Dynamic HTML extensions. This helps Web publishers provide a multimedia experience that is more engaging than anything currently possible inside a browser window. This is the idea behind Active Channels.
At the same time, Internet Explorer 4.0 enables your content to grow in a second direction. Now you can augment your content offering by providing your customers a more immediate, condensed experience. This is accomplished with lightweight entry points to top-level summaries and headlines in a small HTML page displayed directly on the user's Active Desktop. This HTML page presents top-level links and lets your customers point and click to open a larger window and absorb the details waiting underneath. This is the idea behind items on the Active Desktop.
For the user, Active Desktop items and Active Channels complement each other to provide different types of information in a useful manner. In a typical situation, users would log onto their computer and immediately see your Active Desktop item (along with several others) on their desktop. The user scans your Active Desktop item to see highlights and news as of the last scheduled update. The user can then click on any link inside the item to see the full story. At this point, the Active Desktop item can launch the user directly into your Active Channel instead of loading the associated URL into a regular browser window. This example illustrates how the Active Desktop item presents the content summary and the Active Channel presents the details.
For the content provider, Active Desktop items and Active Channels are also a great match. This is because the same knowledge and experience you build when authoring an Active Channel also applies to authoring Active Desktop items. Both Active Channels and Active Desktop items use Dynamic HTML to make the most engaging use of their screen area, while at the same time conserving bandwidth. It is important to note that both Active Channels and Active Desktop items require a separate Channel Definition Format (CDF) file to configure their update schedules and presentation requirements.
Active Desktop Features
Because Active Desktop items and Active Channels leverage the same technology, many of the features that apply to Active Channels also apply to Active Desktop items. These features include:
Subscriptions Icons are placed in the Subscriptions folder to let users manage update schedules and notification attributes. CDF Support Subscription icons are based on the information in a CDF file that you author. The CDF file contains special tags to alert Internet Explorer 4.0 that the content is intended for use as an Active Desktop item. Additional CDF elements are available to control how the item is displayed and when it is updated. Personalized Active Channels and Passwords Personalized password-based access to a Web publisher's content is available. Since an Active Desktop item is just a tiny Web page, navigating to the content is the same as navigating to a page in a browser window, so you can use a CDF file to support automatic login and password verification. Publishing Information on the Active Desktop
The following sections describe how Web publishers can create and display content in an Active Desktop item. Examples of Active Desktop item installations are provided at http://www.microsoft.com/ie/ie40/gallery.
Active Desktop items are placed beside existing desktop shortcuts to give users a highly customizable space for creating dynamic links to their favorite Web content. Active Desktop items are typically designed to provide summary information in a small amount of screen space. Most items offer hot spots so the user can click on that area of the item to open a new browser window; the user can then read the full story or browse through the rest of the Web site. The following screen snapshot shows an example of an Active Desktop hosting two Active Desktop items on the right side of the screen, with the standard desktop shortcuts placed on the left edge of the screen.
Possible Active Desktop items include:
- Tickers for sports scores, stock quotes, or weather.
- Headline lists for news stories or announcements.
- Pop-up broadcast messages for internal corporate announcements.
- Notifications for new mail, chat, or public discussion forums.
- Pictures of sports highlights or breaking news stories. A picture can be configured for daily update; clicking the picture could launch a browser window to preview the related story.
Active Desktop items are completely customizable:
- By the end user.
An item can be positioned and resized anywhere on the desktop. The user can also customize schedules for updating each item separately.
- By the corporation.
MIS managers can pick and choose a mix of default Active Desktop items for their clients by workgroup or division. Managers can also lock the Active Desktop items to prevent incorrect configuration by end users and filter out undesirable content by implementing a full range of security restrictions. Desktops can be configured for roaming access across workstations, and all settings can be administered remotely.
- By the publisher.
Items can consist of any HTML-based content, including Dynamic HTML, ActiveX Controls, Java applets, scripting, frame sets, and so on. Items can be initially configured with a default update schedule so content providers can manage their server traffic. This is accomplished with the use of a Channel Definition Format (CDF) file.
Active Desktop items are an evolution of Internet Explorer 3.0 desktop shortcuts. They can be any size or shape and can display any HTML-based content. Items are dynamic and can be configured to update at regularly scheduled times, so their content is always up to date. As part of the information delivery system in Internet Explorer 4.0, the URL associated with any Active Desktop item is automatically added to the user's Subscriptions folder. This has the following effects:
- All content is automatically cached offline in the user's cache. This makes content available for browsing when no Internet connection is currently available.
- Users will be automatically notified whenever the item is changed on the server. Internet Explorer 4.0 provides this service automatically for all subscriptions.
- Each Active Desktop item can be scheduled individually for updates on the client. For example, users could display a sports ticker that is updated once an hour, a news headline service that is updated once a day, and a comic strip that is updated once a week, all sharing space on the same desktop. Internet Explorer 4.0 automatically refreshes the associated HTML content on the desktop whenever the update occurs.
How the Active Desktop Works
The Active Desktop in Internet Explorer 4.0 is built from two separate layers. The transparent icon layer exposes all the user's existing desktop shortcuts, and the background HTML layer hosts all Active Desktop items. The HTML layer is described by a single, local HTML file called Desktop.htm that is created and edited automatically by Internet Explorer 4.0. This file contains the following:
- HTML tags that represent each Active Desktop item. Each Active Desktop item consists of a single HTML tag with arbitrary x- and y-positions. Refer to the documentation on Positioning for a description of 2-D positioning and layering with Dynamic HTML. The HTML tag used for an Active Desktop item can be either an image (IMG tag) or a floating frame (IFRAME tag). The tag is generated automatically by Internet Explorer 4.0. The floating frame is the most commonly used approach, because it neatly encapsulates an entire arbitrary HTML document that can contain anything the publisher desires. In either case, there is a single URL that points to the actual content.
- An ActiveX control that enables moving and resizing of the Active Desktop items and also helps manage the list of items.
- Any other static HTML that the user wants to have in the background. By default, this is just a reference to the user's chosen wallpaper, which is exposed as the background watermark for the HTML page.
Active Desktop Item Development Guidelines
An item is nothing more than a small, borderless frame that displays a Web page and is embedded on the Active Desktop. The Web page can contain anything that a standard Web page can contain, including ActiveX Controls, Java applets, Dynamic HTML, and so on. The Active Desktop lets the user add and remove the frames at will, as well as adjust their size and position with the mouse.
Users can choose to create an Active Desktop item out of any existing Web page, but the best ones are Web pages that have been specifically designed to be used as Active Desktop items.
When designing an Active Desktop item, there are several guidelines to keep in mind.
- The item must work offline.
Since most dial-up users do not have a constant connection to the Internet, an Active Desktop item should display some reasonable content in the absence of a connection. This is of key importance, because the desktop is immediately visible when the user launches the operating system, even before the user has a chance to initiate a dial-up session. An Active Desktop item that displays a blank, gray square or an error message while the user is offline is neither useful nor attractive. For this reason, any necessary data files the item requires should be configured to be cached on the user's computer. This can be particularly tricky for Java applets, because image objects typically sit in separate GIF or JPEG files on the Web server. Fortunately, the Internet Explorer 4.0 subscription feature can be configured to cache any object referenced by an Active Desktop item by including it in the CDF file with the ITEM element.
In the typical case where an item is built from an HTML document inside a floating frame, Internet Explorer 4.0 subscriptions can be set to automatically download any inline images, sounds, objects, or applets, and also any number of HTML links n levels deep. It is important to note that Java applets cannot be pre-cached if the Java classes are not wrapped together in a CAB, ZIP, or JAR file. If the classes are in separate files, Internet Explorer cannot determine the Java class dependencies and cache appropriately because Java binds classes dynamically.
Java- and ActiveX-based desktop items should also be authored to give an error or informational message when not connected to the network to prevent an empty gray box from being displayed. Also, to read from the cache when not connected to the network, Java applets should call setUseCaches(TRUE) in their java.net objects. For more information about authoring Java or ActiveX desktop items, review the list of frequently asked questions.
Active Desktop items can also specify individual subscriptions for any data files or objects it might reference. Please note that Java applets and ActiveX Controls must be signed so they can access content from the offline cache. For more information about signing Java applets or ActiveX Controls, see http://www.microsoft.com/java/ or http://www.microsoft.com/windowsdna/.
- Avoid using in-place navigation controls.
Active Desktop items are meant to be lightweight and therefore have no navigation controls available for the user to move backward and forward. By default, clicking a link inside an Active Desktop item creates a new browser window. The intended purpose of an Active Desktop item is to provide quick summary information and an easy browser-launching mechanism if the user wants more information. Therefore, authors shouldn't create in-place navigation controls, and they shouldn't depend on the Back and Forward commands being available to the item. Active Desktop item authors should not make any assumptions about the context in which the item is running. More information about properly handling the context in which an Active Desktop item runs is available in the list of frequently asked questions.
- Smaller is better.
An Active Desktop item needs to share the desktop space with any other icons or Active Desktop items the user has selected. Because this space is completely customizable by the user, Active Desktop items should be authored to be as small as possible to display their desired content. This gives Active Desktop users the maximum flexibility to arrange their desktop as they wish. A good benchmark is to make sure that the Active Desktop item takes up no more than one-sixth the area of the screen. By default, Internet Explorer lays out new Active Desktop items on a 3´2 grid. As more items are added to the desktop, they will start to overlap each other. For a desktop at a resolution of 640´480, allowing for reasonable spacing between items, this would translate into a maximum size of no more than 200´200 pixels. This size specification is merely a guideline. Internet Explorer 4.0 does not itself enforce any restrictions on the size of an Active Desktop item.
- Avoid pop-up messages.
Today it is common for ActiveX Controls, Java applets, and scripting content to notify the user of error messages or warnings by using modal dialog boxes that overlap the browser window. This is fine when the browser window is in the foreground. However, launching a modal dialog box from an Active Desktop item might confuse the user. If an Active Desktop item delivers a pop-up message to the user while the desktop is not in the foreground, the user might not be sure where the message came from or what to do about it. The typical situation to avoid is showing error messages when an Active Desktop item can't connect to the server. In these cases, the item should display some type of status message in the Active Desktop item itself, preferably with a hot spot or link that lets the user get more information and figure out how to proceed.
- Use the default color palettes.
A large portion of Internet Explorer 4.0 users have displays that are limited to 256 colors. For these users, Internet Explorer chooses a default palette that is intended to give a broad range of hues across the entire color spectrum. Therefore, when authoring an Active Desktop item, it is important to keep in mind exactly what the image colors will look like on a 256-color display.
- Include a rating tag in your item.
Content Advisor is a feature in Internet Explorer that allows parents and supervisors to filter out Web content based on rating labels. This feature is based on the World Wide Web Consortium (W3C) standard for content ratings, known as PICS (http://www.w3.org/PICS), or Platform for Internet Content Selection. PICS allows for any rating system to be used and lets the parents or supervisors decide what types of content are acceptable. Web publishers should include a rating tag in their HTML files because someone browsing with the Content Advisor turned on will not be able to see content that is not rated. For more information, see Internet Ratings in the Internet Client SDK.
- Handle expiration dates.
Web publishers can define an expiration date for time-sensitive desktop items. This information is specified by the STOPDATE attribute of the SCHEDULE element. For example, a typical desktop item schedule might look like this:
<Schedule STOPDATE="1998.11.05T08:15-0500"> <IntervalTime DAY="1" /> <EarliestTime HOUR="12" /> <LatestTime HOUR="18" /> </Schedule>This schedule shows that on November 5, 1998, Internet Explorer will stop refreshing this desktop item's data from the source URL. The desktop item will remain on the user's desktop, but its content will become stale. A few days before the desktop item expires, Web publishers should replace the content that is pointed to by the desktop item with a notification page. This page should explain to users that the desktop item is no longer valid and that they should either close it or get a new one. The actual desktop item should not be deleted from the HTTP server until after the expiration date to avoid having broken desktop items on users' desktops.
How to Develop an Active Desktop Item
The process for creating an Active Desktop item is very similar to the process for developing a simple channel. In fact, the same steps apply:
- Design the Active Desktop item.
- Create the CDF file.
- Post the CDF file.
- Offer the Active Desktop item to users.
Design the Active Desktop Item
An Active Desktop item is just a small Web page. This page gets embedded in the user's Active Desktop as a floating frame inside a single Desktop.htm file that describes the user's HTML wallpaper and all other Active Desktop items.
Note Try implementing Dynamic HTML in your Active Desktop item. It is common for an Active Desktop item to cycle through a set of headlines or summary information. Dynamic HTML makes it possible to achieve this effect without using Java or ActiveX code.
Create the CDF file
Creating a CDF file is very similar to creating a CDF file for an Active Channel. The primary rule is that you are required to create a separate CDF file for each Active Desktop item or Active Channel you author. For more information about CDF elements and their syntax, see the documentation on CDF Extensions for Active Desktop Items and the CDF Reference for Active Channels.
Basic syntax: The ITEM and USAGE elements
The CDF for an Active Desktop item must include at least one ITEM element under the top-level CHANNEL element with a USAGE child element marked as "DesktopComponent" (see the example below). It is this USAGE element that tells Internet Explorer the CDF file refers to an Active Desktop item, as opposed to an Active Channel. The CDF file should also include a SCHEDULE element to indicate when the item will be updated.
Additional ITEM elements
Since an Active Desktop item is comprised of a single HTML page, the only ITEM you need to include in the CDF file is the small Web page you want to embed in the user's desktop. This should be marked with the USAGE element as indicated in the example below. If you like, you can include additional ITEM elements for each page that the Active Desktop item links to. Including these as ITEMs in the CDF file has the additional benefit of keeping those pages "subscribed to" and available for offline viewing. The ITEMs other than the actual Active Desktop item URL are not exposed to the user. Note that this differs from Active Channels, which present a hierarchical list of their ITEM tags to the user in the form of the Internet Explorer Channel Pane.
CDF restrictions on Active Desktop items
The following restrictions are placed on CDF files for Active Desktop items:
- If your CDF file has more than one ITEM element marked with USAGE equal to "DesktopComponent", Internet Explorer uses the first one it encounters.
- Only the top-level CHANNEL element is valid. Nested CHANNEL elements have no effect because these additional items don't correspond to any list or hierarchy that the user can access.
- USAGE elements set to anything other than "DesktopComponent" are ignored.
Active Desktop item CDF example
The following example shows a CDF file for an Active Desktop item.
<?XML version="1.0"?> <Channel> <Schedule STOPDATE="1998.11.05T08:15-0500"> <IntervalTime DAY="1" /> <EarliestTime HOUR="12"/> <LatestTime HOUR="18"/> </Schedule> <Item HREF="http://www.microsoft.com" LastMod="1996.11.05T08:15-0500"> <Title>My News Ticker</Title> <!-- Friendly name --> <Usage VALUE="DesktopComponent"> <!-- Required --> <OpenAs VALUE="HTML"/> <!-- "HTML" (default) or "Image" --> <Width VALUE="200" /> <!-- Width in pixels --> <Height VALUE="80" /> <!-- Height in pixels --> <CanResize VALUE="Yes"/> <!-- Yes (default) or No --> </Usage> </Item> <!-- Other Item tags may go here. IE4 won't display them anywhere, but --> <!-- will use them for site crawling and place them in the user's cache. --> <Item HREF="http://www.foosports.com/topstories.html" LastMod="1996.11.05T08:15-0500" > </Item> </Channel>Post the CDF File
Post the CDF file by making it publicly available on your Web servers.
Offer the Active Desktop Item to Users
As with Active Channels, a link or button should be placed on any Web page that references the CDF file to allow users to subscribe to the new Active Desktop item. When the user clicks the link, Internet Explorer 4.0 automatically detects the USAGE element, which tells it that the CDF refers to an Active Desktop item. Internet Explorer 4.0 then activates the Active Desktop item Subscription Wizard on the user's computer and allows the user to receive updated information about this Active Desktop item. As the content contained in the Active Desktop item is added, removed, or modified, Web publishers should update the CDF file to reflect the changes. Information about button images and scripts used for enabling subscriptions is available in the Active Channels documentation.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.