|
Java, which is based on the long-established language C++, was first conceived as a programming tool for interactive TV. As the Internet elbowed interactive TV aside, Sun repositioned the language as the ultimate Net programming tool. It's easy to get confused between Sun's Java and Netscape's JavaScript, but try not to, or you're liable to get dirty looks from developers.
Many of the little tricks people attribute to Java -- like pop-up frames and messages that crawl across the bottom of your browser window like army ants -- are in fact a product of JavaScript, a relative that shares a name and some basic syntax but not much else with its big brother. JavaScript provides a relatively easy way to write scripts that control your browser window, and you can do some neat things with it, but it's hardly revolutionary. On the other hand, unlike the world of Java applets, most of the stuff people are doing with JavaScript works pretty well now. (CatchPhrase, a random phrase generator, shows some of the stuff JavaScript can do. Some of its limitations are evident from the Zen Koan Generator, which, neat as it is, has to send its output to you in ugly system dialogue boxes.)
|