Wednesday, February 11, 2009

Java Applets

There are more lessons in the Java Webstart Trail, but quite frankly the effort I have expended so far way exceeds any benefit. After many days of fiddling, I got my application to run using Webstart. But my commercial ISP does not support jnlp files, so I had to host the app on my own server, which is not available 24/7. And the end user is required to have Webstart installed. Frankly anyone, with the skill or the energy or the inclination to install Webstart, could just as well run the app from the command line.

So I shall now look at embedding an applet in a web page. This takes me to a thread entitled Creating and Deploying Applets with Java Plug-in, and the index lesson is simply entitled Applets.

It opens well: "This lesson talks about the basics of applets, advantages of applets over applications, how to load applets in a web page, how to convert applications to applets and how applets work". These are exactly the things I want to know. Let's hope the lesson delivers what it promises.

As usual for this tutorial, however, the lesson is completely back to front. It begins with the last thing I want to know, some boring details about the life cycle of an applet, and continues with the second last thing I want to know, how to load the applet into a web page. Why is this stuff fleshed out on the index page, while the interesting bit: "how to convert applications to applets" is nowhere to be seen, either as a heading to a paragraph, or as a link? The word "convert" appears only once: in the promise, but not in the delivery.

I now have to apply my (non-existent) psychic powers to guess in which branch of the trail I will find what I am looking for. No I'm not getting anything. I've tried chanting, I've tried laying my hands on the screen, but nothing is coming to me. I'll just have to plough through the trail in order until I find what I want.

I thought the whole point of hypertext was to provide links in context to help people find what they want. A good index page would have links embedded throughout the text, not just in the headings. If they only put links in the headings, people might just as well read a good book.

No comments: