Java
Applets
An
applet is a special kind of Java program that is designed to be transmitted
over the Internet and automatically executed by a
Java-compatible web browser. Furthermore, an applet is downloaded
on demand, without further interaction with the user. If the user clicks a link
that
contains an applet, the applet will be automatically downloaded and run in the
browser.
Applets are intended to be small programs. They are
typically used to display data provided by the server, handle user
input, or provide simple functions, such as a loan calculator, that execute
locally, rather than on the server. In essence, the applet allows some
functionality to be moved from the server to the client. The
creation of the applet changed Internet programming because it expanded the
universe of objects that can move about freely in cyberspace. In
general, there are two very broad categories of objects that
are transmitted between the server and the client: passive information and
dynamic, active programs.
For example, when you read your e-mail, you are
viewing passive data. Even when you download a program, the
program’s code is still only passive data until you execute it.
By contrast, the applet is a dynamic, self-executing program. Such a program
is an active agent on the client computer, yet it is initiated by the server.
As
desirable as dynamic, networked programs are, they also present serious
problems in the areas of security and portability. Obviously, a
program that downloads and executes automatically on the client
computer must be prevented from doing harm. It must also be able to run
in a variety of different environments and under different operating systems.
As you will see, Java solved these problems in an effective
and elegant way.
No comments:
Post a Comment