Continuous Delivery and Auto Updating Applications
“You Have 2 Update(s) Available..”
Sounds Familiar !!
It is absolutely essential to have such a provision inbuilt into our Desktop/Windows applications as it can prove to be a boon to any enterprise.
Personally, it brings a smile to my face every time I see an update for any one of my mobile apps. 🙂
We need to embrace what is know as Continuous Delivery Software Development model.
It’s a Software Development practice wherein we use techniques such as Automated Testing, Continuous Integration and Continuous Deployment to :

We may have already put all the effort to setup a source control system, a build server, an automated versioning process and all are configured so that we can release a new Build with the press of a button.
BUT how do we get the new build version to the end users?
This is where an automatically updating application comes into picture.
If we design an application, which is able to query a server periodically (or on user action) for available updates and is able to update itself to a newer version, we save a lot of time, effort and money invested by IT support to distribute application updates.
- ClickOnce
- BITS
- .NET App Updater Block
- NAppUpdate Framework (Strongly recommended; Highly extendible)
- NETSparkle
A feature comparison of the various options available is as under :
Features/Options |
NAppUpdate |
ClickOnce |
BITS |
.NETApp Updater Block |
Installation of updates in the same folder as the application (i.e. the updated version should NOT create a new folder on the Client as in the case of ClickOnce) |
Yes |
Yes |
Yes |
|
Updates over HTTPS or better still, a WCF service (more secure). | Yes |
Yes |
Yes |
|
HOT Swap of update files (Ability to update files without restarting the application.) |
Yes |
|||
Backup and Rollback of updates (In the event of failure) |
Yes |
Yes |
Yes |
|
Download progress |
Yes |
|||
Conditional Updates (based on file version, hash key, size etc.) |
Yes |
|||
Inbuilt file integrity check based on File Hash (This is required in order to ensure that the file has been downloaded correctly/completely) |
Yes |
Yes |
||
Update Download and Update Apply process distinction (This is required in order to ensure that all the updates are first completely downloaded before they are applied in order to maintain the integrity of the updates/application) |
Yes |
|||
Inbuilt Error handling |
Yes |
Yes |
Yes |
|
Ability to perform Cold Updates (i.e. applying updates after the application shuts down) |
Yes |
|||
Should provide a lot of option/points to configure the application. |
Yes |
|||
It should be easily extendible to accommodate new features/interfaces (like new type of update sources) |
Yes |
|||
Ability to resume an interrupted update download. |
Yes |
All the above solutions might not fit into your project directly and may have to modified, BUT there are a few basic points we need to consider before implementing an Auto Update strategy :
1. Pull or Push Notifications : Do you want the user to query the update server or you want to show notifications to the users as a result of automatic periodic query to the update server
2. How much control should the end user have on the Update process: Can the user skip an update?
3. User Access Rights : A User should have adequate access rights on the application as well as the File System in order to update it. This has be enforced by the developer.
4. Supporting Rollback : What happens if an update fails? What happens if the user is not happy with the new version. Can the user rollback an update? Will the rollback triggered from server or simply a user action on the client.
5. Monitoring version Fragmentation: We’ll need to maintain record of which all devices are running on what versions of a software. We’ll need to keep a tab on maximum number of different version of a software we can serve on different devices. The more the version fragmentation, greater the overhead for a developer.
So, if you’re designing a Desktop Application, its absolutely essential to have an Auto-Update mechanism. It’ll make life easy for Dev Team, Release team, IT support as well as the end users (or the Enterprise).