URL Handler to replace an Applet

275 Views Asked by At

Currently my company has an applet that downloads a JAR file to open up and listen to changes in a chosen file, a .doc for example. Then, these changes are uploaded back to our server.

Applets are dying and that is a big problem for us. We thought (and still are thinking) of ways to replace this. JWS, Plugins, Adobe Air, Native Messaging, Active X. A lot of things were considered (and some tested with no luck, like the JWS). But now we are thinking that the best solution could be URL Handlers.

We would have a desktop application that could intercept a URL with the information of the file, download it and then listen for changes.

My questions are: Are we going in the right direction? I'm afraid of choosing another "soon-to-be-dead" technology. And can it be done (well) with Java? All of my actual code (the jar file) is in Java, and my intent was keeping it.

99% of our clients use Windows, so we could focus on that for now.

1

There are 1 best solutions below

0
On

IMHO Custom Protocol Handler is a very valid (only?) replacement for applets using client resources that cannot be used by browsers. And no, for all of you lurkers, you cannot just replace all applets with Javascript/HTML5.

What you passed as parameters to the applet initialization (or as javascript calls) can be replaced with query parameters in you custom URL. The full URL, including ?param1=abc&param2=def, is passed to your application executable.

Yes, you will have to install something on the client computer, as you need at the minimum to register your custom handler. But its a blessing in disguise, as you will be able to bundle your own version of the JRE with your application.

Another interesting aspect is if at some point you need to move to mobile apps, you will already have done the hard work of separating your app from the web.