Deploying an Internal HR Application Using ClickOnce Technology Saves Developer Time and Support Costs

“Our HeadTrax HR application was just too big to be a pure Web application. We wanted the power of a smart client app but wanted to keep the HTTP deployment of a Web app – so ClickOnce was ideal for deployment. When we rebuilt HeadTrax, we saved about $36,500 by using ClickOnce rather than building another custom deployment solution.”

Jim Walker, Program Manager Microsoft IT Dept

When the Microsoft IT department needed to upgrade HeadTrax, an internal solution that consolidates HR database information so that users worldwide can modify HR data, they decided to deploy it using the .NET Framework and ClickOnce technology. This deployment method makes it easy for developers, and helps ensure that all users have the proper policies, permissions, and prerequisites before they install. Rather than maintain a custom-built deployment solution with lots of code and associated documentation to maintain, the Microsoft IT development team follows a simple procedure in Visual Studio when they want to roll out a new version of the application.

Situation

With more than 100,000 employees and vendors worldwide, Microsoft Corporation depends on a flexible and robust approach to the management of human resources (HR) information. HeadTrax is an internally developed solution introduced in 1997 by Microsoft IT that consolidates HR database information and provides HR personnel and other employees a centralized source for accessing and modifying information about people and positions worldwide.

HeadTrax serves about 72,000 users worldwide, 24x7x365, with a peak of about 5,000 users a day (300 concurrent), and averaging 30,000 distinct users per month. As an example of a transaction load, in January 2007, HeadTrax successfully uploaded 59,946 transactions—including office moves, new position creations, and position moves—into the SAP module.

The custom deployment method that the Microsoft IT development team used to roll out new versions of HeadTrax was costly to develop and maintain. It included thousands of lines of code to maintain and document. It was difficult to manage the end user’s experience because, with such a diverse worldwide user base, many end users did not have the proper policies, permissions, or prerequisites to use the application whenever a new version came out.

Web Application vs. Client Application

One of the challenges when redesigning HeadTrax was deciding whether to go with a client-based application or a Web-based application.

While there are many variables to consider, one of the major requirements is ease of deployment. Given the very nature of Web applications, they can be deployed on a single server. As long as there are no client-side dependencies, other than the browser, Web applications are easy to deploy and update.

On the other hand, Windows Forms applications are compelling given all the excellent user interface options, ease of development , utilization of local resources (reducing server load) and capability to run off line. However, deploying a Windows Forms application can create a whole new problem domain that has various challenges, such as the following:

·  Necessity of using a “push model” for initial deployment and updates

·  Controlling when the application should check for updates

·  Versioning of the application.

  1. How to migrate user application data between different versions
  2. How to roll back to previous versions

·  Requiring users to update to a newer versions of the application for critical updates

Solution

The development team decided to use the .NET Framework to provide a rich user experience through a smart client. The .NET Framework provides a superior deployment model, a more robust security model, and efficiencies in development and design. Migrating to the .NET Framework also paved the way for continuous improvements, such as small-scale changes to business rules or to the HeadTrax user interface, without affecting the rest of the solution.

The team redesigned the application in Visual Studio 2005 using Windows Forms built on the .NET Framework 2.0. Using Windows Forms class libraries in the .NET Framework, developers designed the user interface to include transaction wizards and a more intuitive way of navigating through the search and change-submission processes. Developers also created a workflow model that enhances visibility into the state of a transaction at any given time and reduces the need for requests to remain in a pending state.

In general, migrating to the .NET Framework has been very cost effective for the development team. To integrate a promotions tool, for example, required just one developer working one month at 75 percent capacity. To integrate the internal staffing and external staffing tools, developers found it comparatively easy to match new data points, build in new business rules, and build in separate flows and custom business logic without having to duplicate development effort. For these integrations, Microsoft IT estimates that switching to the .NET Framework represented a development savings of 25 percent.

Figure 1 shows the user interface of HeadTrax.

Figure 1: HeadTrax user interface

ClickOnce Deployment

For deployment, Microsoft IT used Visual Studio’s built in ClickOnce technology. Installing HeadTrax is a Web-like experience. Users install HeadTrax by opening a Web page on an internal server and then clicking a link.

ClickOnce then checks for the correct policies, permissions, and prerequisites automatically. It checks the user’s processor and version of Windows. It verifies that the version of the.NET Framework needed to run the application is installed. If the .NET Framework is not installed, they are prompted to install it. It checks if required custom assemblies are present in the GAC. Developers can include a custom bootstrap package with the deployment, so in cases where the custom assemblies are not installed, users will be prompted to install them. Figure 2 shows the ClickOnce dialog box that appears when it checks for required custom assemblies.

Figure 2: ClickOnce checking for custom assemblies

One of the key benefits of deploying applications using ClickOnce is the built-in client requirement validation. Prior to using ClickOnce, if the user’s Active Directory settings weren’t correct, or if the user’s computer didn’t have trust policies configured properly, or if the user was using a 64 bit computer, then deployment failed. This was a significant problem with over 100,000 computers dispersed worldwide at the time. After switching to ClickOnce, the support costs associated with configuring client machines were eliminated.

Figure 3 shows ClickOnce verifying application requirements when launching the application.

Figure 3: ClickOnce performing the client requirement validation

ClickOnce deployment makes developing smart client applications more appealing with the option of Web-like ease of deployment. Jim Walker, Program Manager in the Microsoft IT department said, “Our HeadTrax HR application was just too big to be a pure Web application. We wanted the power of a smart client application but wanted to keep the HTTP deployment of a Web app – so ClickOnce was ideal for deployment. When we rebuilt HeadTrax, we saved about $36,500 by using ClickOnce rather than building another custom deployment solution.”

Application Updates

When the development team wants to roll out a new version of the application, they publish the new version using ClickOnce. The process is simple to understand and explain. Using ClickOnce is essentially an “out of the box” method for shipping new versions of smart client applications. ClickOnce enables developers to configure their application to check for updates automatically each time the user starts it, or at predetermined intervals. Developers can also use the ClickOnce update APIs to control updates themselves programmatically. . The HeadTrax team decided to have HeadTrax check for updates at startup.

ClickOnce also enables developers to specify whether an upgrade is option or required. If an update is optional, users are prompted to install the new version when they open the application. Critical updates are installed automatically without prompting the user.

Figure 4 shows the ClickOnce dialog box that appears when a user starts HeadTrax and an update is required.

Figure 4: ClickOnce performing a required update

Puneet Taneja, Senior Development Lead at Microsoft said, “Our custom deployment solution cost us 4 months of developer time to build and required continual maintenance. Switching to a ClickOnce deployment model cost us 2 to 3 weeks of developer time to configure and automate, and our maintenance time is negligible. Compared to pure Web applications, Windows Forms applications are more mature and just as robust.”

Code Signing

Internally, Microsoft requires code signing. Manifest files that define what files are deployed on the client must be signed using an Authenticode certificate. This prevents anyone from tampering with the contents of a manifest once it has been signed.

Signing a manifest file can be as simple as setting a few properties in Visual Studio when you have a certificate available with which to sign the manifest, or when you want to generate a certificate of your own for testing purpose. However, signing a manifest file can be complex when you need to sign code by using an external authority that manages and controls the certificate availability. Because ClickOnce certificates are maintained by an internal certificate authority at Microsoft, the IT department was required to follow a two-stage signing process.

Stage 1

·  Generate an application manifest file using the MAGE.exe tool.

·  Submit the generated manifest file for Authenticode signing to the certificate authority.

·  Extract the signed application manifest file.

Stage 2

·  Generate a deployment manifest file using the MAGE.exe tool that contains information about the signed application manifest file.

·  Submit the generated manifest file for Authenticode signing to the certificate authority.

·  Extract the signed deployment manifest file.

The final step in customizing the ClickOnce solution was to automate this process using an MSBuild script embedded within the code project files. You use the MSBUILD.EXE command line tool to perform these steps and make the application ready for deployment with all the manifest files signed using the Authenticode certificate. At this point, you can deploy an application by copying the built assemblies along with manifest files to a Web site/virtual directory on IIS. Users can access the application and install it using an HTTP URL as if they were accessing a Web application.

Figure 5 shows the HeadTrax ClickOnce installation dialog box. This dialog box indicates that the application has been code signed by Microsoft Corporation.

Figure 5: HeadTrax ClickOnce installation dialog box

Puneet Taneja, Senior Development Lead at Microsoft said, “After our experience with HeadTrax, Microsoft IT decided to deploy all our smart client applications using ClickOnce. ClickOnce just answered all our questions in the form of an easily customizable solution. As an added benefit, we no longer had to maintain a deployment code base and documentation. And, having been associated with multiple applications in Microsoft IT that use ClickOnce deployment solution, I felt confident that ClickOnce was easily understood and thus leads to a very low ramp-up time.”

Software and Technologies

Some of the software and technologies used to build HeadTrax include the following:

·  Microsoft® .NET Framework 2.0

·  ClickOnce technology and Mage

·  Microsoft® Visual Studio® 2005

·  Microsoft® Visual C#® 2005

·  Microsoft® Visual Basic® 2005

·  Microsoft® Windows Forms

·  Microsoft® Internet Information Services (IIS) version 6.0

·  Microsoft® SQL Server™ 2005

·  Microsoft® Internet Explorer®

·  Microsoft® Windows®

·  Microsoft® Windows ServerÔ 2003

For More Information

For more information about ClickOnce and Windows Forms, visit the following sites:

Deploying .NET Framework Applications
http://msdn2.microsoft.com/en-us/library/6hbb4k3e.aspx

ClickOnce Deployment Overview
http://msdn2.microsoft.com/en-us/library/142dbbz4.aspx

Windows Forms MSDN Developer Center
http://msdn.microsoft.com/netframework/windowsforms

Windows Forms Product Page
http://windowsforms.net

West Coast Life Insurance Case Study (using ClickOnce)
http://www.microsoft.com/casestudies/casestudy.aspx?casestudyid=49165

Wine.com Case Study (using ClickOnce)
http://www.microsoft.com/casestudies/casestudy.aspx?casestudyid=48823

Microsoft Sales Application Case Study (using ClickOnce)
http://www.microsoft.com/casestudies/casestudy.aspx?casestudyid=49078

For more information about Microsoft products or services, call the Microsoft Sales Information Center at (800) 426-9400. In Canada, call the Microsoft Canada information Centre at (800) 563-9048. Outside the 50 United States and Canada, please contact your local Microsoft subsidiary. To access information via the World Wide Web, go to:
http://www.microsoft.com/
http://www.microsoft.com/technet/itshowcase

© 2007 Microsoft Corporation. All rights reserved.

This case study is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY. Microsoft, .NET Framework, Active Directory, ClickOnce, Internet Explorer, Internet Information Services, SQL Server, Visual Studio, Visual Basic, Visual C#, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

HeadTrax Page 7