Export (0) Print
Expand All
6 out of 8 rated this helpful - Rate this topic

Updater Application Block - Version 2.0

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

 

Updater Application Block–Version 2.0

patterns & practices Developer Center

patterns & practices Developer Center

Microsoft Corporation

March 2005

The patterns & practices team has decided to archive this content to allow us to streamline our latest content offerings on our main site and keep it focused on the newest, most relevant content. However, we will continue to make this content available because it is still of interest to some of our users.
We offer this content as-is, without warranty that it is still technically accurate as some of the material is undoubtedly outdated. Note that the content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Summary

This page provides an overview of the Updater Application Block, version 2.0. An application block is reusable and extensible source code-based guidance, and this application block shows how to add self updating capabilities to .NET-based smart client solutions (such as applications built with Windows Forms).

Downloads
Webcast
Community
  • Updater Application Block [Content link no longer available, original URL:http://practices.gotdotnet.com/projects/updater]
Feedback
FAQ and Solutions to Common Problems

* Important Note: The January 2005 release of Enterprise Library is no longer available to download, due to important issues discovered after the release. You will need to download Enterprise Library-June 2005 and modify the Updater Application Block to use this version of Enterprise Library. For more information, see Using Enterprise Library-June 2005

Contents

Introduction to the Updater Application Block
Common Scenarios
Audience Requirements
Highlights of Version 2.0 Release
System Requirements
Design of the Updater Application Block
Getting Started
Using Enterprise Library-June 2005
Feedback and Support
Future Plans
Authors and Contributors
Related Titles

Introduction to the Updater Application Block

The Updater Application Block is a .NET Framework component that you can use to detect, download, and apply client application updates deployed in a central location. By using the Updater Application Block, you can keep smart client applications up to date with little or no user intervention. You can also extend the Updater Application Block to use custom classes for downloading files and for performing post-deployment configuration tasks.

Specifically, the Updater Application Block helps you in the following ways:

  • It helps you implement a "pull model" for automatically downloading updates for .NET Framework applications.
  • It helps you perform post-download configuration tasks without requiring user intervention.
Note   This application block for .NET has been designed based on reviews of successful .NET Framework applications. It is provided as source code that you can use "as-is" or customized for your application. It is not an indication of future direction for application deployment within the Microsoft .NET Framework. Future releases of the .NET Framework may use a different model to address application deployment.

Common Scenarios

The Updater Application Block is designed to support the most common scenarios for self-updating applications:

  • It supports applications that need to be kept up to date with current executable versions.
  • It supports applications that use multiple plug-ins that users can download and activate on their desktops.
  • It supports applications that rely on reference data (for example, a large set of documents) that need to be cached on the client and occasionally updated from a server.

The design of the application block supports these scenarios while providing a manageable and scalable solution that strikes a balance between flexibility and complexity. The main design goals of the Updater Application Block, version 2.0, are the following:

  • Simplify the addition of self-updating capabilities to an application
  • Simple migration of Updater Application Block based applications to ClickOnce (.NET 2.0)
  • Efficient use of network bandwidth
  • Processing of complex updates

Audience Requirements

This guide is intended for software architects and software developers. To benefit fully from this guide, you should have an understanding of the following:

  • Microsoft Visual C# or Microsoft Visual Basic .NET
  • .NET Framework 1.1
  • Windows Forms

Highlights of Version 2.0 Release

This release of the Updater Application Block, version 2.0, includes the following new features:

  • Much simplified public APIs
  • Events to enable the application to perform any custom processing at key stages of the update process
  • Support for partial updates
  • Support for using events to monitor download progress
  • Support for updates based on Microsoft Windows Installer technology
  • Separation of concerns: manifest, downloader, and activation with extensibility points at appropriate levels
  • Support for multiple types of downloaders
  • A graphical tool for managing configuration settings based on Enterprise Library
  • Adherence to the patterns & practices Enterprise Library specification

System Requirements

The Updater Application Block requires the following software:

  • Windows XP Professional
  • Microsoft .NET Framework version 1.1 SDK
  • Microsoft Visual Studio 2003
  • Enterprise Library 1.0 installed and compiled
  • Background Intelligent Transfer Service (BITS) for the out-of-the-box downloader to function correctly

The application block has been tested using this configuration and cannot be guaranteed to function correctly in other environments.

Design of the Updater Application Block

The Updater Application Block is designed to provide a "no touch" solution to the problem of keeping desktop applications up to date in enterprise environments. You can use it out-of–the-box to perform the downloading and activation of updates for your applications. It is also designed to be extensible, so you can customize the default application block to perform exactly the functionality that your application requires, whether that is using a different type of download technology or performing a complex set of tasks after the download process is complete.

The application block consists of four subsystems, each designed to fulfill a specific role in the application update process. These subsystems include the following:

  • Update management subsystem. The update management subsystem consists of the ApplicationUpdaterManager, RegistryManager, and UpdaterTask classes. ApplicationUpdaterManager is a facade into the Updater Application Block. This is a singleton and is responsible for interacting with the ManifestManager to determine when the updates are available. It also provides methods to the client application to start the download and activation processes.
  • Manifest management subsystem. The manifest is configuration information for the update to be applied to the client application. It is stored on the server; the information describes the updates that are available and the configuration of those updates. It also defines the activation processors that should be executed after the files are transferred. Manifest classes access this information and make it available to the other classes in the application block.
  • Downloader subsystem. This subsystem is responsible for connecting to the server and downloading the updates to the client computer.
  • Activation subsystem. This subsystem is responsible for performing any activation processing, for example, copying the downloaded files to a specified location, deleting temporary files and folders, or registering assemblies in the global assembly cache.

Figure 1 shows the high level design of the Updater Application Block.

Ff650611.f00uab01(en-us,PandP.10).gif

Figure 1. High level design of the Updater Application Block

The simplest use case of the Updater Application Block consists of the following steps:

  • The client application requests the ApplicationUpdaterManager to check if any updates are available.
  • The ApplicationUpdaterManager uses the ManifestManager to retrieve the XML manifest for this application from a specified server location.
  • If updates are available, the ApplicationUpdaterManager calls the DownloadManager, which uses the BITSDownloader to transfer the files from server to client.
  • After all the relevant files are downloaded, the ActivationManager uses the specified ActivationProcessors to activate the files.

Getting Started

The Updater Application Block has been developed as a result of analyzing common enterprise development challenges and successful solutions to these challenges. However, because each application is unique, you will not find this application block suitable for every application. To evaluate this application block and determine its applicability to your projects, Microsoft suggests you dedicate at least half of a day to explore the application block. The following is a suggested evaluation approach:

  • Read the "Introduction" and "Scenarios and Goals" sections of the documentation.
  • Download Enterprise Library-June 2005.
  • Install and compile the Enterprise Library.
  • Download and install the Updater Application Block.
  • Modify the Updater Application Block to use Enterprise Library-June 2005. For more information, see Using Enterprise Library-June 2005.
  • Compile the Updater Application Block.
  • Compile and run the QuickStart samples, and read through the related "QuickStart Walkthroughs" and "Key Scenarios" sections of the documentation.
  • If the application block looks like a good fit for your application, try implementing a simple use case in your application or in a throw-away prototype application using the application block.

Using Enterprise Library-June 2005

The Updater Application Block needs to be modified to use Enterprise Library-June 2005. You must perform the following steps:

  1. Download Enterprise Library-June 2005.
  2. Install and compile the Enterprise Library.
  3. Open the Visual Studio Updater.sln solution file in Visual Studio .NET 2003. On the taskbar, click Start, point to Programs, point to Microsoft patterns & practices, point to Updater Application Block v2, and then click CS Application Updater Solution or VB Application Updater Solution.
  4. If the Common project is unavailable, remove the project from the solution. To do this, right-click on the Common project and select Remove. Next, right click on the Updater Solution, point to Add, and select Existing Project. Browse to the Enterprise Library-June 2005 Common project file (by default, located in C:\Program Files\Microsoft Enterprise Library June 2005\src\Common)
  5. Repeat Step 4 for the Configuration project. By default, it is located in C:\Program Files\Microsoft Enterprise Library June 2005\src\Configuration.
  6. Repeat Step 4 for the Configuration.Design project. By default, it is located in C:\Program Files\Microsoft Enterprise Library June 2005\src\Configuration\Design).
  7. Repeat Step 4 for the Security.Cryptography project. By default, it is located in C:\Program Files\Microsoft Enterprise Library June 2005\src\Security\Cryptography).
  8. Repeat Step 4 for the Security.Cryptography.Configuration.Design project. By default, it is located in C:\Program Files\Microsoft Enterprise Library June 2005\src\Security\Cryptography\Configuration\Design).
  9. In the solution explorer, expand the References folder under the ActivationProcessors project. Remove references to the following projects. To do this, right-click on the project and select Remove:
    • Common
    • Configuration
    • Security.Cryptography

    Add references to the following projects. To do this, right-click on References and select Add Reference. Click on the Projects tab, select the following projects, and click OK:

    • Microsoft.Practices.EnterpriseLibrary.Common
    • Microsoft.Practices.EnterpriseLibrary.Configuration
    • Microsoft.Practices.EnterpriseLibrary.Security.Cryptography
  10. Repeat Step 9 for the Downloaders project. Add references to the following projects:
    • Microsoft.Practices.EnterpriseLibrary.Common
    • Microsoft.Practices.EnterpriseLibrary.Configuration
  11. Repeat Step 9 for the Updater project. Add references to the following projects:
    • Microsoft.Practices.EnterpriseLibrary.Common
    • Microsoft.Practices.EnterpriseLibrary.Configuration
    • Microsoft.Practices.EnterpriseLibrary.Security.Cryptography
  12. Repeat Step 9 for the Updater.Configuration.Design project. Add references to the following projects:
    • Microsoft.Practices.EnterpriseLibrary.Common
    • Microsoft.Practices.EnterpriseLibrary.Configuration
    • Microsoft.Practices.EnterpriseLibrary.Configuration.Design
    • Microsoft.Practices.EnterpriseLibrary.Security.Cryptography
    • Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Configuration.Design
  13. Build the solution. On the toolbar, select Build Solution from the Build menu.

To test, you should run the QuickStarts. First, you will need to perform the steps above for each Quickstart and then you can build and run the QuickStart.

Feedback and Support

The Updater Application Block is a guidance offering designed to be reused, customized, and extended. It is not a Microsoft product. Code-based guidance is shipped "as is" and without warranties. Customers can obtain support through Microsoft Support Services for a fee, but the code is considered user-written by Microsoft support staff.

Future Plans

An updated version of the Updater Application Block that uses Enterprise Library June 2005 will soon be available. Following this, there are no plans for another release of the Updater Application Block. The .NET Framework 2.0 and Visual Studio 2005 include a new deployment technology, named ClickOnce, to address these same technical challenges. Better alignment to this new technology was one of the main design goals for this release.

As deployment and controlling application updates continues to be an important scenario, we plan on continuing to provide guidance in this area. The community site [Content link no longer available, original URL:http://practices.gotdotnet.com/projects/updater] is the perfect place to post needs and challenges faced when deploying applications.

Authors and Contributors

The Updater Application Block was produced by the following people:

  • Program Manager: Srinath Vasireddy (Microsoft Corporation)
  • Product Manager: Eugenio Pace (Microsoft Corporation)
  • Architect: Edward Jezierski (Microsoft Corporation)
  • Development: Naveen Yajaman (Microsoft Corporation); Juan C. Elichirigoity, Diego Gonzalez, and Pablo Cibraro (Lagash Inc)
  • Test: Mohammad Al-Sabt (Microsoft Corporation); Prashant Bansode, Terrence Cyril J, Rohit Sharma, Mani Krishnaswami, Thiagarajan.S (Thiagu), and Gokula Prakash (Infosys Technologies Ltd)
  • Documentation and Samples: Matt Evans (Microsoft Corporation); Lin Joyner (Content Master Ltd); Tina Burden McGrayne (Linda Werner & Associates Inc) ; Tim Osborn (Ascentium Corporation)
  • Release: Sanjeev Garg (Satyam Computer Services)

Many thanks to the following advisors who provided invaluable assistance:

  • Windows Forms .NET product team: Keith Yedlin, Simon Muzio, and Jamie Cool (Microsoft Corporation)
  • DP&E: David Hill (Microsoft Corporation)
  • Community Members: Paul Cox; Denny Figuerres; Marc Loeb; Bill Wagner; Wilson Chiesa and Marcos Pedroso (Microsoft Consulting Services); Samuel Santiago (SoftiTechture Cons)

Related Titles

Next

patterns & practices Developer Center

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Show:
© 2014 Microsoft. All rights reserved.