Lots of adult webmasters love coffee but they hate Java.
Java is a programming language created by Sun Microsystems. Sun developed Java for a noble purpose: cross-platform interoperability. Java was supposed to be able to work on any operating system, on any server software and with any brand of web browser.
|
"JavaScript is kind of like Java decaf. All of the taste, but none of that awful caffeine. " |
Unfortunately, a lot of adult webmasters hate JavaScript as much as Java.
Java doesn’t work very well on the most popular web browser in the world: Microsoft Internet Explorer. On top of that, there’s a certain type of Java class file that can look really cool and perform really neat tasks but it is notoriously buggy. That type of Java class file is the Applet.
If you can get one to work and get one to load, a Java Applet is pretty neato. I’ve seen applets that scroll headlines and applets that make an image appear as if it’s sitting on top of a pool of water. The thing is, Java applets are similar in behavior to Flash animation. In other words, you have to wait for the applet to fully load before you can enjoy its gee-whiz effect.
The fact that Microsoft uses Java language incompatible with Sun’s is one reason Java applets don’t work very well. Another reason for the bugginess with Java applets is that an applet comes in two parts. The first part is the code which you embed on your HTML page. The second part is that the class file your code refers to must be stored in it’s own directory on your web server.
When a surfer opens your web page, their browser has to download two documents in order for your Java applet to work correctly. Their browser has to download your HTML document -with the embedded applet code- plus the browser has to download the Java applet class file stored in the Java class directory. Many times in IE, a web page with an applet will not fully load until after the applet class file loads first. If your server hangs on that class file your page won’t load and you will have lost a surfer. Nobody wants to lose a surfer if they don’t have to.
If you still believe in the goodness of Java but can’t bring yourself to even think about those nasty applets, may I suggest my favorite cup of Java: JavaScript.
JavaScript is kind of like Java decaf. All of the taste, but none of that awful caffeine.
JavaScript works within the Browser Software. It’s more compatible with IE and definitely more compatible with Netscape Communicator and Opera than applets are. For one thing, most JavaScript applications don’t require the surfer to download an additional class file. Even the JavaScript applications that point to a class file still perform correctly on a regular basis in browsers.
There are all kinds of neat little JavaScripts that can enhance the look and operation of your web page. If you want to make a site logo that will be read as text by the search engines, you can do it with JavaScript. If you want to include an interactive webform on your page but you don’t know Perl and your server isn’t CGI enabled, you can add a webform created with JavaScript. You can do a lot of things with JavaScript and JavaScript can do a lot of things for you.
One drawback to JavaScript is that some surfers will disable all Java on their browsers. Another problem is that each brand of Browser Software interprets JavaScript differently. This incompatibility is the main reason that not all JavaScripts work exactly the way you’d like them to.
Still, when a JavaScript works, it works quickly and cleanly. A bonus is there are hundreds and hundreds of free JavaScripts out there for you to use. Most of them are cut-and-paste and come with detailed instructions. Also, JavaScript is pretty easy to understand when you look at it because it’s based on words and characters much like HTML.
If you like the idea of Java but don’t like those crappy applets, consider JavaScript. Here are some swell places you can go to understand and download free scripts: