14.07.2013 Views

Contents - Cultural View

Contents - Cultural View

Contents - Cultural View

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Java applet 33<br />

there are frequently a lot of them, so applets got a reputation as slow<br />

loading components. However, since jars were introduced, an applet is<br />

usually delivered as a single file that has a size of the bigger image<br />

(hundreds of kilobytes to several megabytes).<br />

Since Java's bytecode is platform independent, Java applets can be<br />

executed by browsers for many platforms, including Microsoft<br />

Windows, Unix, Mac OS and Linux. It is also trivial to run a Java<br />

applet as an application with very little extra code. This has the<br />

advantage of running a Java applet in offline mode without the need<br />

for any Internet browser software and also directly from the<br />

development IDE.<br />

Many Java developers, blogs and magazines are recommending that<br />

[16] [17]<br />

the Java Web Start technology be used in place of Applets.<br />

A Java Servlet is sometimes informally compared to be "like" a<br />

server-side applet, but it is different in its language, functions, and in<br />

each of the characteristics described here about applets.<br />

Technical information<br />

Java applets are executed in a sandbox by most web browsers,<br />

preventing them from accessing local data like clipboard or file system.<br />

The code of the applet is downloaded from a web server and the<br />

browser either embeds the applet into a web page or opens a new<br />

window showing the applet's user interface.<br />

A Java applet extends the class java.applet.Applet, or in the case of a<br />

Swing applet, javax.swing.JApplet. The class must override methods<br />

from the applet class to set up a user interface inside itself (Applet is a<br />

descendant of Panel which is a descendant of Container. As applet<br />

inherits from container, it has largely the same user interface<br />

possibilities as an ordinary Java application, including regions with<br />

user specific visualization.<br />

The domain from where the applet executable has been downloaded is<br />

the only domain to which the usual (unsigned) applet is allowed to<br />

communicate. This domain can be different from the domain where the<br />

surrounding HTML document is hosted.<br />

Using applet for non trivial<br />

animation illustrating<br />

biophysical topic (randomly<br />

moving ions pass through<br />

voltage gates) [3]<br />

Using Java applet for computation - intensive<br />

visualization of the Mandelbrot set [4]<br />

Java system libraries and runtimes are backwards compatible, allowing to write code that runs both on current and on<br />

future versions of the Java virtual machine.<br />

Embedding into web page<br />

The applet can be displayed on the web page by making use of the deprecated applet HTML element, [18] or the<br />

recommended object

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!