Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

Java and the new Internet programming paradigm

An excerpt from <em>Rise & Resurrection of the American Programmer</em>

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

Page 2 of 7

What is Java all about?

In a nutshell, Java is an object-oriented programming language based on C++ that allows small programs -- or "applets" -- to be embedded within an HTML document. When the user clicks on the appropriate part of the HTML page to retrieve it from a Web server, the applet is downloaded into the client workstation environment, where it begins executing. [Editor's note: Since this text was written, the definition of Java has expanded beyond Web-based applets; Sun expects the language to be used for all sorts of applications, and promises a Java operating system, Java microprocessors, and more -- and now refers to Java as a platform.]

Java's origins go back to 1991, when Sun Microsystems began looking for ways to create platform-independent code to support consumer electronic products. After some initial efforts with C++, the Sun project team abandoned it and created its own language initially called Oak, later renamed Java. Oak first was used to create software for a personal, hand-held remote control device, but when the project team lost a bid to develop a television set-top box for Time-Warner, attention switched to the Web. The Sun project team then built a Web browser, originally called WebRunner and then renamed HotJava, in the Java programming language. The rest, as they say, is history: Sun formally announced Java and HotJava at the SunWorld '95 conference in San Francisco on May 23, 1995.

The relationship among Java programs (or "applets"), the Java-enabled browser, and the Web is illustrated in Figure 1. Users access a Web page and pull it down to their client. In this case, though, the Web page contains an additional HTML tag called "APP," which refers to a Java applet, and that applet can be located anywhere on the Web. If the user's Web browser is Java-enabled (for example, Sun's HotJava browser or Netscape's Navigator 2.0), then the applet is pulled down into the user's client computer and executed within the browser environment.


Figure 1. Relationship between Java applets,
Java-enabled browser, the user, and the Web


Java is often described as a "cross-platform" programming language; it's also common to refer to Java programs as "architecture-neutral bytecodes." It has to be this way, of course, because the Web server that delivers the Java applet to the Web client doesn't know what kind of hardware/software environment it's running on. And the developer who creates the Java applet doesn't want to worry about whether it will work correctly on OS/2, Windows, Unix, and MacOS.

The key to Java, as used on the Web, is the notion of executable content, rather than static content. What capability does this provide us? Thus far, most of the demonstrations and examples have involved fairly simple graphics -- a bouncing ball on a Web page, for example. But there are some other examples you can look at, if you have a Java-enabled browser, of course:

  • The Rolling Stones' Web site (http://www.stones.com) contains animated flags and a puzzle that allows the user to slide squares around to form the "tongue" logo.

  • The NandO Times Web-based news service (http://www.nando.net/newsroom/nt/nando.html) displays a ticker tape of headlines about sports, politics, national news, and world news that scrolls continuously across its primary page. Each of the four categories of news stories is illustrated with a picture; the pictures change in synchronization with the news stories in the ticker tape, thus providing an interesting amalgamation of the best of TV and newspapers.

  • ESPNET SportsZone (http://espnet.sportszone.com)provides an up-to-date scoreboard of football, baseball, and basketball scores.

  • HotWired (http://hotwired.com) uses Java to animate its Web pages for the digital version of Wired magazine.

  • Dimension X (http://www.dimensionx.com) has been working on Iced Java, a 3-D rendering engine.

  • VPRO (http://www.vpro.n1), a public broadcasting organization from Hilvershum, Holland, uses Java to provide an automated, hands-off tour of its Web site.

  • Sun Microsystems (http://www.sun.com) has a number of Java examples and demos as well. This Web page links to several other important resources about Java; see the references below for details.


The Java environment

The full Java Development Kit contains the following components:

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources
  • Web sites
  • Books
  • December, John. Presenting JavaAn Introduction to Java and HotJava. (Indianapolis, INSams.Net Publishing, 1995).
  • Tittel, Ed, and Mark Gaither. 60 Minute Guide to Java. (Foster City, CAIDG Books Worldwide, Inc., 1995).
  • Articles