APPLICATION


applets | intranet | castanet

Last updated: April 1998

Java was popularized by Sun in 1995 when it released alpha and beta versions of a Java Development Kit (JDK) which allowed developers to create little programs called applets which could be embedded in a web page and run inside the browser window of the new Netscape Navigator 2.0. As interest in Java grew, developers also began using the JDK and emerging IDEs to create full-blown graphical applications, the classic example being Corel Office for Java. Meanwhile startups were experimenting with the new possibilities offered by a platform-neutral networking language - for instance, the idea of distributing and updating commercial applications over the Internet was applied by a break-away team from Sun called Marimba in their Castanet product. Furthermore, as the Web grew in popularity LANs began using browsers to share information, and Java was the ideal language to run programs for these new intranets.



TextScroll Applet APPLET TEXTSCROLL REQUIRES COMMUNICATOR OR IE 4. applets

Applets are the face of Java on the Web, and a large cause for the language's growth in popularity since 1995. Applets are Java programs which can run inside a browser window using the browser's Virtual Machine (VM). Netscape was the first to introduce this capability with its 2.0 browser; Microsoft also provided support for it with Internet Explorer 3.0; and with the 4.0 browsers both vendors have updated their Virtual Machines to be compatible in varying degrees with the JDK 1.1.

An applet has a particular code structure. The class written by the programmer will use java.applet.Applet as a superclass and may override the following methods among others:

  • init()
  • start()
  • stop()
  • destroy()
  • paint(Graphics g)
  • run()
There is an example of an applet (your browser's VM must be compatible with JDK 1.1) on the left: a little illustrative program for scrolling text I wrote. The code is stored in a .java file as usual and compiled to a .class file using javac or an IDE's compiler; tested using appletviewer or the IDE's runtime engine, and then embedded in a web page using code like the following:

Applets can be distributed over the Internet, but are also useful client programs for Intranets. To date applets have been limited by the immaturity of the language, the barebones simplicity of the AWT (Abstract Windowing Toolkit), incompatibilites and bugs in VMs, and slow download and startup times. As a result applets are often thought of as good for little more than graphical effects on web pages. However this is changing.

RESOURCES

Overview of applets in Sun's Java tutorial

Gamelan has a large collection of applets




intranet

An intranet is a local network which uses the TCP/IP (Internet) protocol for communication. In a three-tier scenario, there is typically a database residing on a server, an application server program running on the same machine, and many clients communicating with the application server. There are variations of course: you could have multiple servers, the data source could be files, etc..

In a heterogenous LAN environment, i.e. one where the workers are using different operating systems, Java is an ideal language for the clients. The client program could either be an applet running in Netscape Navigator or Internet Explorer, or it could be a separate client application. One of the reasons Java is so suitable for an intranet environment (rather than the general internet) is that the information personnel can ensure that the client machines are equipped with robust Virtual Machines, e.g. by installing Activator for all browsers, or ensuring that all Macs use MRJ 2.0.

For simplicity the server may also be written in Java, but it can also be coded in a faster language such as C++, or it can be a hybrid of languages. The JNI (Java Naming Interface) may be used to interface between Java and other languages. To ensure that objects may be passed around the intranet smoothly a network architecture such as CORBA or RMI is commonly adopted. Once the interface for the client is established, the server code and the organization of the database may be modified independently.

RESOURCES

Netiva - creators of an Intranet Application System using Java and a little C++. If you use their product you can create intranet applications by point-and-click, i.e., without any coding of your own.

JIF - the Java Intranet Framework classes

Innergy and the Intranet Design Magazine




castanet

The company Marimba is currently shipping a technology called Castanet which allows Java applications and other forms of data such as HTML pages to be distributed over the Internet or Intranet in the form of channels. Unlike ordinary Windows executables, applications downloaded using Castanet do not have free reign over your whole hard disk; each channel has its own directory for reading and writing. Moreover by maintaining a TCP/IP connection with the source of an application, the client can receive updates from time to time as the product is improved.

There are two essential Castanet products: the Transmitter, a server-like application for sending out information on channels and the Tuner, a client-like application for receiving that data. As of writing Castanet channels included TV listings, technology resources, stock watches, games, and various software applications such as a home designer progam. If you get the Tuner you can receive these general Internet channels; if you get the Transmitter you can create your own channels. Marimba also supplies a simple Java GUI development tool called Bongo.

RESOURCES

Marimba, creators of the Castanet software