ClickOnce, I think I love you
Sunday, February 25 2007
A couple months ago I wrote a post about how I didnt really like ClickOnce and that I was going to use ClickThrough. Well, I was wrong. ClickOnce is pretty awesome once you get into it. I also couldn't find much information about ClickThrough and it looks like there isn't much active development going on there.
I thought I needed to use a .msi file to get the install functionality I needed, but it turns out it was all built into ClickOnce... the only issue is that the ClickOnce documentation sucks pretty bad. Because the documentationm sucks I picked up Smart Client Deployment with ClickOnce by Brian Noyes and this book kicks ass, it answered all my questions and helped me figure out the best way to install and update my application.
I kept running into issues I thought would break ClickOnce, but it turns out they did think through alot of stuff. One part that really impressed me is the data migration scenario. Let's say my user is off-line for a week, then they log back in and there is an update. If the update includes updates to the local database then it would overwrite all of their data from the last week... but what ClickOnce does is make a copy of the old data file and put it in a .pre folder in your deployment. This way I can write code that will check to see if the .pre folder is there and if so migrate any of their offline changes.
-James
Comments
- #1 Tim Marman on 2.26.2007 at 1:29 AM
-
There are many things I love about ClickOnce, but the one thing that really gets me is that the application manifest has to be signed with the deployment url or the app doesn't load. This means 1) no aliases and 2) you effectively can't package them (as most enterprises would do). We've worked around this by using mage at install time, but even then you can't test a node directly... and if you rename the cluster, it fails.
It's a little disappointing that they've implemented yet another level of security instead of relying on the underlying .NET trust (e.g., let me trust everything signed by a particular publisher). I'm told this restriction will be lifted in the future somewhat - that is, the deployment url will be dynamically populated based on where it was first run from.
That reminds me, I've been meaning to write up my experiences with ClickOnce.
