**6.1. Working and architecture of applets**

specific use of mobile code under the field of code mobility. In the code-on-demand style, as delineated in **Figure 10**, a client component has an access to a set of resources, but not the know-how on how to process them. It sends a request to a remote server for the code representing that know-how, receives that code, and executes it locally. So as per the code-on-

Say for example, one host (A) initially is unable to execute its task due to a lack of code (know-how). And another host (B) in the network provides the needed code. Once the code is received by A, the computation is carried out on A's machine. Host A holds the processor capability as well as the local resources. Unlike in the client–server paradigm, A does not need

Java applets are excellent practical examples of this paradigm. Applets get downloaded in

demand paradigm, knowing the know-how is necessary when in need [17].

Web browsers and execute locally.

16 New Trends in Industrial Automation

**Figure 11.** Architecture of applet.

**Figure 10.** Code-on-demand.

knowledge about the remote host, since all the necessary code will be downloaded.

The internet is a combination of various kinds of systems or platforms that are often required to communicate with each other. The client that makes a request may be from a completely different platform for instance the application may be hosted on the windows based server and client may be requesting from a Linux-based system.

Java introduced a new technology that would allow any client from any network platform to host and execute applications over the internet. This new technology was called as applets [18]. The word applet stands for an "application scriplets". This can be defined as a piece of java code residing on a server machine requested via a browser downloaded over the internet and executed on the client machine via the browser. In order to execute the applet on a client machine, the browser must be java enabled i.e. JRE must be enabled. An applet is typically embedded inside a web page and runs in the context of a browser. The browser's Java Plug-in software manages the lifecycle of an applet. The architecture of applet is shown in above **Figure 11**.
