Applet Programming and Deploying

Introduction

Applets are small java programs that performs a particular task and these programs runs within a browser.These programs are compiled and deployed in a web server.When client requests for these applets, these programs are downloaded  into   client's machine and executed in the browser.Applets executes in the JVM provided by browser.

Applets can be transported over the net from deployed computer to client and can be run using a web browser or Applet Viewer tool of a local machine tool.Applets can be embedded into web pages.An applet can perform many things like arithmetic operations,graphics display,sound playing,accept user input e.t.c .

Types of Applets

Applets can be included into web pages in two ways .
  • Local Applet : An applet which is written and compiled locally and placed in local system.When browser is trying to locate applet, there is no need to search over the net.
  • Remote Applet  : A Remote applet is a java program written by someone else and kept on the web server or in a remote system which is connected to the network.In this type first the applet is downloaded into the client system and executed in browser.
In both the above two cases, we must specify the address (URL) in applet's HTML document as value parameter for CODEBASE attribute of HTML.

Differences between Applications and Applets

Even Applets are also java programs as stand-alone applications, they differ in their features. The differances are as follows.
  • Applets are designed to accomplish small or specific task for use on the internet.
  • Stand-alone applications can run independently, where as Applets cannot.Applets run inside a web page using HTML tag.
  • Applets cannot communicate other systems over the network.
  • Applets cannot communicate other programs or resources.
  • Native library (C,C++ e.t.c)  usage is restricted in applets.
The above limitations are designed and placed in the interest of systems security to avoid damage to systems.


When to use Applets

In the following situation we can  consider writing applets :
  • When we have to add something dynamically to be displayed in our web page.
  • when we need to make a program and it is kept available for others using web on their systems.
  • When the flash outputs required.

0 comments:

Post a Comment