Musings about Coding, Business and other Geek Stuff Live and Direct from somewhere on the planet
May 21, 2004
Web Start and Iterative GUI Development

Just saw Alan’s entry about web start, which pretty much mirrors my experiences. I am developing an IM like end user tool NeuClear Personal Trader for the NeuClear open source clearing system. I’m currently doing many changes to it throughout the day in response to user interactions etc.

As such it is probably one of the most excellent additions to the development cycle of gui apps. Web apps are relatively easy to redeploy, but gui apps have traditionally been a pain in the ass.

Every time I deploy a new change the user just has to restart the application and it’s done.

Using Maven JNLP

I use Maven, which I know many people dislike. For me though it’s great. I was able to start creating Java Web Start apps with only a very slight knowledge of the api. Maven includes the very cool JNLP Plugin. You simply add a few properties to your project.properties. The following are from mine:

maven.jnlp.title=NeuClear Personal Trader
maven.jnlp.vendor=Antilles Software Ventures SA
maven.jnlp.homepage=http://neuclear.org
maven.jnlp.icon=$$context/images/neuclearicon.png
maven.jnlp.icon.splash=$$context/images/neuclearsplash.jpg
maven.jnlp.permission=all
maven.jnlp.http.codebase=$$codebase
maven.jnlp.mainclass = org.neuclear.signers.standalone.QuickStart
maven.jnlp.jardiff=true
maven.jnlp.j2se.version=1.4

and type:

$ maven jnlp

The plugin does the rest.

The wonders of JarDiff

One of the biggest complaints had from users initially was that everytime I made a change to a jar file they had to download the whole jar again. I did some research and discovered Sun’s JNLP Download Servlet.

This does a few clever things with regards to serving web startable apps, but the coolest is the JarDiff functionality.

Lets say the user has already got dom4j version 1.4 installed on their PC and you updated your app to use 1.5. The next time the user goes to start your app, the Web Start client tells the servlet that it already has version 1.4. So the download servlet creates a diff of the two versions. If the difference is less than downloading the new file it provides the client with a patch that it uses to recreate the new version. It works pretty well and for minor changes to your app really speeds up things over downloading a whole new version.

Add JarDiff support to Maven JNLP

The Maven JNLP plugin currently handles the creation of the jnlp file and the version information the download plugin needs wrongly.

The problem is described on the Maven JNLP Jira. I have created a patched version

Posted by pelleb at May 21, 2004 02:03 PM
This entry was posted in the following Categories: Java
Comments

"As such it is probably one of the most excellent additions to the development cycle of gui apps." - Finally they've done it!!! I've been waiting for this for a while. Now I'm enjoying the improvements like a baby :))

Posted by: Chrisrine on June 9, 2004 03:01 PM
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?