The deal

Java and Javascript are often confused. They are not the same thing. Java is both an application programming language (text editors, paint programs, spread sheets) and an authoring tool for little "applet" extensions to the functionality of a web page. Javascript, on the other hand, is used within the context of a browser only. It doesn't have nearly as many "packages" of pre-built tools for use in writing complex programs. However, because Javascript is interwoven in HTML, it can lead to more dynamic pages that resemble application interfaces.

Another myth holds that Javascript is easier to learn than Java. Well, okay, but Javascript has many confusing caveats as well. The unitary variable type used in Javascript creates as many problems as it "esquimotes" (french for disappears). Also, the Javascript "feature" of not requiring semi-colons at the end of each line sometimes creates code that is harder to read and prone to accidental malfunction. Debugging Javascript has been more difficult in the first few years of Javascript's existence as well, whereas the Java compiler errors are quite informative. So, in general, be skeptical of hucksters who would have it that Javascript is dream-easy.


Voodoo Java

An example Java applet

  • Check out the voodoo doll applet (http://www.virtual-design.com/demos/voodoodoll/voodoo.asp?section=demo&subsection=voodoo).

    Javascript

  • Javascript was supposed to be called "Livescript"
  • It became "Javascript" because of the marketing hype surrounding Java, and because it was made to resemble Java syntax
  • It is used principly to control and monitor states of the client's browser
  • It is less evenly implemented than Java, supporting many functions in Netscape 3.0 that are not available in Netscape 2.0 and Inet Explorer
  • The scripts are loaded, in most cases, with the html file itself, and so it is readily readible by viewing sources.