02 July 2006

Some notes on Java Generally

Caveat: this website is NOT an authoritative source of information. Notes and links are for my own education. I do not profess to be an expert.

Java is a programming language developed by Sun Microsystems in the early 1990's. It was unusual in that it was designed to be platform-independent, which is to say, it could run on any type of computer without any modification. The only requirement was that the computer had to have a type of program called a "Java virtual machine," which is something built into the web browser. Careful readers will point out that Java really wasn't platform-independent at all, it just had a platform which used the web browser as an operating system. Getting the browser to run on Macintosh, Windows, or whatever else one used, was someone else's problem.

Java is not to be confused with JavaScript, which is something else entirely.

Java is designed to run on the browser, so that the host for the website merely delivers the code and program-related data to the browser; the browser then creates the website "experience." This is in contrast to CGI applications, which are also dynamic, but which run entirely on the host. It is also designed to be very similar to C++, which was then the most commonly-used object-oriented programming language. Its developers argue that it was optimized for speed and reliability, too. Java is designed to support multithreading.

In Java, all source code is first written in plain text files ending with the .java extension[*]. Those source files are then compiled into .class files by the compiler[*]. A .class file is written in bytecodes — the machine code of the Java VM. The java launcher tool then runs your application through the site visitor's web browser. There is an integrated development environment (IDE) available to Java programmers called NetBeans (a cute allusion to coffee, again); however, it's not absolutely necessary for developing in Java.

In addition to the more conventional Java arrangement, in which a website is delivered as an executable program and automatically run by the browser, there is the CGI-like Java Servlet. An installation of Java Servlet uses information input by the user to create temporary pages.
web browser: programs such as Microsoft Internet Explorer, Netscape Navigator, Mozilla Firefox, Apple Safari, NCSA Mosaic, and so on. Browsers are, naturally, a large collection of simple programs which allow a computer user to navigate the world-wide web.

code = instructions that collectively make up a computer program; data = information that the program performs operations on; for example, a database management software (DBMS) has the program that manages data, and the data being managed. Website "experience": not a formal term of art, as far as I know; but while some websites (like this one) are mostly static and just display words and pictures, others may be interactive, or animated.
ADDITIONAL READING & SOURCES: Java Online Tutorial, downloaded here; The Java Language Environment, by James Gosling & Henry McGilton (1996); "Beginning and Intermediate-LevelServlet, JSP, and JDBC Tutorials," ${coreservlets.com};

The Java NetBeans IDE may be downloaded for free here.

For a critical view of Java, "Why Java Sucks," B. Jacobs. I freely admit the criticisms were too recondite for me to understand, and are from the point of view of a developer. See also "Java sucks," Jamie Zawinski, which is easier to understand.

Labels: , , ,


Post a Comment

<< Home