Java Network Support
Java's early Internet identity was strongly connected to applets.
A Program That Travels Through the Internet
Early in Java's history, Java was closely tied to the Internet in people's minds. The reason was a kind of program called an applet. An applet was a small program that was transmitted over the Internet and run on a web page. This article follows that idea step by step, then shows how Java's role on the Internet changed, and why Java's network support and platform independence still matter today.
What do you think happens?
Are applets still the main way Java is used on web pages today?
Reveal answer
No. Applets are no longer used.
The source states that applets ran on web pages after being transmitted over the Internet, but they are no longer used. Java remains relevant through other kinds of Internet software, which the rest of this article describes.
Tracing an Applet from Server to Screen
The applet model can be read as a chain of three events. First, transmission makes the program available over the Internet. Second, the web page runs the program. Third, the page can then support complex tasks and user interaction. Notice that the program itself is not stored in the page in advance as the main content. It arrives over the network and then takes part in what the page does.
- 1Transmission: a small Java program travels over the Internet, so it becomes available to the page.
- 2Running: the web page runs the applet rather than only displaying it.
- 3Interaction: the running program can carry out complex tasks and respond to what the user does.
- 4Result: the page is no longer only information. It becomes a place where a program is active.
Following one applet on a news page
Suppose a web page contains an applet that lets a reader arrange a set of charts and change their settings. Trace what happens from the moment the page is requested to the moment the reader interacts with it. This is a generated illustration built on the source's three-step model, not an example taken from the source.
- 1Transmission
The applet program is sent over the Internet as part of delivering the page.
- 2Running
The web page runs the applet, so the charts appear as an active part of the page.
- 3Interaction
When the reader changes a setting, the running applet performs the complex task of updating the charts.
The page does more than present information. The program that travelled over the Internet is what makes the interaction possible.
Why Applets Mattered and Why They Faded
Applets were one of Java's major attractions when Java was introduced. They showed that a web page could include a program capable of complex tasks and complex interactions with the user. This was a significant idea at the time: a page could go beyond static information and become interactive through a program that was delivered with it.
However, applets experienced various problems. As a result, they are no longer used, and other options now exist for running programs on web pages. The source does not list the specific problems, so this article does not name them. The important lesson is historical: the applet was a major step in connecting Java with web pages, and it was later replaced by other approaches.
An applet is best understood as a historical delivery model. It is not the current way Java is commonly used on the Internet.
Java's Role After Applets
Java's Internet role did not end when applets declined. Java can still be used to create complex stand-alone applications that do not depend on a web browser, and many of these applications are network-related. In addition, many of the largest and most complex web sites use web server software written in Java. The shift is from a small program running on a page to Java software supporting larger Internet systems.
| Feature | Applet model (historical) | Current Java uses |
|---|---|---|
| Where the program runs | On a web page, after transmission | On a server, or as a stand-alone program |
| Typical role | Adds complex tasks and interaction to a page | Powers web server software, complex web applications, and network programs |
| Relationship to the browser | Depends on the web page | Stand-alone applications do not depend on a web browser |
| Current status | No longer used | Continues to be used |
The applet model contrasted with Java's continuing Internet roles, based on the source
Network Support and Platform Independence
Java includes excellent support for network protocols. This matters because Internet applications and other network-related programs need to communicate using network rules and conventions. Java's network protocol support is one of the reasons it can be used for Internet applications.
The source also connects Java's platform independence with portability. A network program can be written so that it works on many different types of computer. Network support and platform independence therefore reinforce each other: the network support lets the program talk over the Internet, and platform independence lets that same kind of program be used across different machines.
Imagine a small network program that asks a remote machine for information and displays the reply. Written once in Java, the program can be run on a laptop, a desktop, or a server without being rewritten for each kind of computer. This is a generated illustration of the idea of portability; the source states the general principle, not this specific program.
Mistakes About Java and the Web
Common mistake Assuming Java's web role is still the applet
What it looks likeDescribing Java on the Internet only as programs that run inside a web page
Why it failsApplets are no longer used. Java's continuing Internet role includes complex web applications, web server software, and stand-alone network programs.
Do this insteadDescribe applets as a historical model, and name the current uses separately.
Common mistake Treating applets as a failed idea with no lasting significance
What it looks likeSaying applets were unimportant because they are no longer used
Why it failsThe source says applets were one of Java's major attractions when Java was introduced, because they showed a page could include a program doing complex tasks and interactions.
Do this insteadExplain that applets were historically important and later declined.
Common mistake Assuming platform independence means no testing is needed
What it looks likeBelieving a network program will work everywhere just because it is written in Java
Why it failsThe source makes a narrower claim: platform independence makes it possible to write network programs that work on many different types of computer.
Do this insteadTreat platform independence as an enabling property, not a guarantee.
Common mistake Confusing network protocol support with a web page feature
Practice: Classifying Java's Internet Roles
For each of the following, decide whether it describes the historical applet model or Java's current Internet role: (a) a small program transmitted over the Internet and run on a web page; (b) web server software written in Java for a large, complex site; (c) a stand-alone network program that does not depend on a web browser. Then explain in one sentence why platform independence helps a network program work on many types of computer.
Hints
- Ask whether the program runs on a web page after being transmitted, or on a server or stand-alone.
- Look for the phrase 'no longer used' in the source for the historical model.
- Platform independence is about writing a network program that works on many different types of computer.
Key Takeaways
- An applet was a small Java program transmitted over the Internet and run on a web page, letting the page perform complex tasks and interactions.
- Applets were historically important because they were one of Java's major attractions when Java was introduced, but applets experienced various problems and are no longer used.
- Java's Internet role continues through complex web applications, web server software used by large sites, and stand-alone network-related programs.
- Java includes excellent network protocol support, and its platform independence makes it possible to write network programs that work on many different types of computer.