Tuesday, August 12, 2008

How to fix your desktop application

Ok, a quicky..

Google's calender, spredsheet applications, mail have started to displace desktop applications. Why? IMHO they suck. They try to be desktop applications but are nasty, buggy, pale imitations. They do have a few things that desktop applications can learn from.

1) No dang installation step. I've always hated installing applications. Is anyone here over 30? Can anyone remember installing applications on Macs circa 1992? The correct answer to that question, with a few exceptions, was no. You just dragged the application from the floppy to where you wanted on your hard disk. The only reason you didn't run the dang program directly from the floppy was it ran slow. 'm using windows XP and everything little thing has an installer. Step one to making desktop applications suck less, get rid of installers. Let's get a standard where I can run desktop applications from the web and cache them locally, please.

2) No load time. Web applications don't need to load. To be honest I'm still not sure why desktop applicati0ons have a load time... and I've been writing them for years! While writing Myster I tried to reduce the amount of time it took to load. In the end I managed to get it down to some reasonable fraction of what it took to load the java virtual machine but really it should have been even shorter.

Just what the heck is happening during a program launch anyway? The answer is the machine reads a block of computer instructions from the HD and starts executing them. This is actually quite fast.. even on windows. The trouble comes when these initial instructions start loading libraries and building tables and constants and loading the code that loads the preferences and reading from the preferences and loading parsing them then loading all the icon resources then displaying those. The list goes on and on. In the end, desktop applications take a long time to load.

If your desktop application takes longer to load than my perception of instantaneous, then you should be making it faster. If your application feels the need to present a splash screen it's taking too long to load. If your app takes longer to load than a typical web page then it's too slow.

3) Web pages can be accessed from anywhere. I'm not entirely sure why I can't access my home documents or application setting from another location. Part of this problem is that applications require an installer and I don't want to go through this heavy install process in order to access my information from another PC. The other part is because I have to find someplace where I can store my documents or setting in order to access them.

Web sites don't have this problem. In one of the weirdest examples or this I have ever seen, my web browser of choice has an option to store its settings remotely. The idea is that when I use my web browser on a different machine, the settings I usually use follow me there. Hurray! Now the three machine I use daily will be in sync. The thing is, in order to use this feature I have type enter a server to connect to to store my settings. Are you kidding me? I got this browser from a website.. A web site that appears to have no problem handling a bazillion downloads of said web browser every month, not to mention other page hits etc.. But it won't allow me to store my settings anywhere on its servers. Is this desktop application group think?

4) Platform compatible. The three machines I use daily are all on different platforms. I have a mac, a PC and a Linux box. I can view the same web sites on all. Desktop apps? Yeah, there are some ports but I would have expected that we'd have cross platform code by now. Java has been around for some time now and does it fine.

gumble grumble grumble..

So at work I'm currently working on a brand new desktop application product. I want to give demo/beta applications to people. I don't want to keep sending out installers to everyone what can I do?

Well, The application is in java so I use Java web start.

With java web start you go to a web page, click on a button or link, the application is then downloaded to your machine (if it's not cached there already) and run. The whole process is a bit quirky in practice since you have to click on a box acknowledging that you're downloading an application by someone named whatever.. but it works. Want to run it offline? Yep, you can do that too. It's like having a desktop application available from a web page. This application, also has roaming user preferences as well so if you go to a different machine, the preferences can follow you around via your login. Basically, it nails 3 out of the four things above. The startup time isn't the best.. I mean this is java, but it's still fast than open office, for example, so it's not bad...

yeah.. I can see this stuff happening.

No comments: