Applet Deployment Improvements

   

There have also been improvements in the areas of applets. The four main improvements are

  • Applet Caching Control

  • Fast Loading of Applet Support Classes

  • Jar Indexing

  • Automatic Installation of Extensions

Applet Caching Control

Most applications in the past that used applets have relied on the browser cache to keep the applet from being downloaded each time it's referenced. The applet was stored in the browser cache and the cache's applet was used instead when the application referenced the applet instead of downloading it again. However, there was a problem with this method because if the applet was large and the cache for the browser was full, the applet could be removed and would have to be downloaded again if it was referenced by the application.

With the 1.3 version, the applet deployer can decide that the applet should stay around longer and thus make the applet "sticky." This causes the applet to stick around in a secondary cache on the client machine. The only time that the applet is downloaded again after the initial time is if the server were to have a newer version available for the client. This new secondary cache is provided by the Java plug-in.

Fast Loading of Applet Support Classes

JAR files containing support classes for applets can now be placed in the Java 2 Runtime Environment/Plug-in lib/applet/ directory. This reduces startup time for large applets by allowing applet classes to be preloaded from the local file system by the applet class loader, providing the same protections as if they had been downloaded over the net.

JAR Indexing

Instead of the class loader having to search linearly through all the resources in the CLASSPATH, the class loader is able to use the INDEX.LIST file that can be generated by the jar utility to create a lookup of supporting files and/or resources. This helps decrease the time it takes to locate files within JARS and decrease the overall startup time for applications, especially applets.

Automatic Installation of Extensions

Version 1.3 of the Java 2 Platform introduces support for an expanded set of JAR-file manifest attributes that enables applets to specify version and vendor information for the optional packages that they require. The manifests of JAR-packaged applets can specify a URL at which the latest version of the optional package the Java Plug-in can download if

  • The needed optional package is not already installed in the Java runtime environment

  • The optional package is installed but has an out-of-date version number

  • The optional package is installed but is not from a specified vendor

   


Special Edition Using Java 2 Standard Edition
Special Edition Using Java 2, Standard Edition (Special Edition Using...)
ISBN: 0789724685
EAN: 2147483647
Year: 1999
Pages: 353

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net