Smart Client and ClickOnce Deployment

23 Mar. 2011 Software Development

Smart client application architecture is becoming more popular as a replacement for many intranet portals and some Web applications. There are many factors to be considered to build a reliable, secure, scalable and performing application. After developing, designing and testing the application with its middle tier components, the next step is to deploy the application to various client machines and support it with regular updates.

Smart client applications are easy to deploy and update. To provide easy deployment and update features the smart client applications uses ClickOnce deployment mechanism which is a part of the .NET Framework 2.0. ClickOnce enables automatic deployment and updates smart client applications over the network from a deployment server. In order to deploy or update an application, the application needs to be published to a deployment server and a link to the application should be provided to the users. The application is then automatically deployed and cached on the user’s client computer as soon as the user launches the application using the link provided. The ClickOnce deployment, as the name suggests, is click-once deployment which allows the user to deploy and run the application from the deployment server.

ClickOnce Deployment Modes

The ClickOnce Deployment supports two types of deployment modes

  1. The Installed Mode
    • This mode supports the use of deployed application on the client computer even when the client computer is offline
    • The deployed application can be launched using the shortcut created when the application was first installed
  2. The Online-only Mode
    • The application can be launched only through the link provided to the deployment server
    • The application can be launched only if the client computer is connected to the deployment server.

ClickOnce Deployment Update Options

There are two modes of updates ClickOne supports:

  1. Automatic Updates
    • These updates are done by a runtime on the client computer which schedules updates depending on the user options as below
      • Checking updates before or after the application starts or both
      • Creating the update optional or required
      • Scheduled checking for updates on regular intervals
      • Checking for updates in a remote location other than the installed client computer.
    • ClickOnce downloads an update automatically as soon as it is available on & connected to the server. These updates will apply the next time the application runs.
  2. Programmatic Updates:
    • These updates are performed through the “ApplicationDeployment” class in the “System.Deployment.Application” namespace.
    • The updates can be delayed to be installed on the client computer after they are available on the server. This can be done using one of the following ways
      • By using the ClickOnce programmatic API to detect and delay programmatically downloading the update till the delay criteria is met.
      • By using a dynamic loading mechanism e.g. Composite UI Application Block profile catalog which can regulate when to load and start using a file.

ClickOnce Deployment Scenarios

  1. Broadcast Deployment:
    • It is the most common and default approach of ClickOnce deployment.
    • All users start downloading the updates that are placed on the deployment server immediately after it is published.
  2. Staged Deployment:
    • Different groups of users are expected to download the new updates that are placed on the deployment server at different times
  3. Future Deployment:
    • The new updates that are available on the development server are to be applied at a specific point in the future.

ClickOnce Deployment Architecture:

The first step in ClickOnce deployment is placing the application files on the development server. On publishing an application, two manifest files associated with a ClickOnce publication are generated: the deployment manifest and the application manifest.

  • The deployment manifest contains information about the publication along with the link to launch the application on client computers, the update policy and a reference to the application manifest.
  • The application manifest consist of the list of files that composes application and the set of permissions required to run the application

ClickOne applications can be published from Visual Studio using a tool named “Manifest Generating and Editing Tool (Mage) or custom tool that utilizes the ClickOnce publishing APIs.

Get a Free ConsultationTalk to our experts to get the best suited solution for your business.

Follow Us
Subscribe to the Blog
Get a Free Consultation
Reach out to our team to get a free consultation for your next projectContact Us