Developing Custom Java Processors - Applications vs. Applets
Before you deploy a custom Java Step or Launch Processor, you will need to
decide whether to deploy it as an application or an applet (there may be some
advantages to deploying it as an application). For the purposes of this discussion,
these terms may be defined as:
- Applet an applet is a program that is launched and run within
the context of a web browser. (In a Java Step Processor Toolkit context, applets
refer to classes that extend JApplet, or FileNET's VWBaseAppLauncherApplet
class, which is itself an extension of JApplet.)
- Application an application is a Java application invoked by
its package/class name. (In a Java Step Processor Toolkit context, applications
refer to classes that extend JFrame, or FileNET's VWBaseLaunchableApplication
class, which is itself an extension of JFrame.)
This topic explores this issue in terms of:
Applications vs. Applets General
Guidelines
The following general guidelines apply when considering whether to deploy your
custom Java Step or Launch Processor as an application or an applet:
- In general, it is optional as to whether you deploy a Java Step or Launch
Processor as an application or an applet. The sample or out-of-the-box Step
and Launch Processors included with the Java Toolkit will each run as either
an application or an applet.
- If a Java Step Processor is to be opened from an email notification message,
you must implement an applet class. In other words, if you deploy as an application,
the Step Processor must implement an applet class in order to open the step
assignment from an email notification message. On the other hand, if a Step
Processor is to be opened from an email notification message and you deploy
it as an applet, there is no requirement to implement an application class.
Since Launch Processors cannot be opened from an email notification message,
there is no need to implement an applet class if you are deploying a Launch
Processor as an application.
Why Deploy Your Step Processor as
an Application
There are a number of advantages in deploying a custom Java Step or Launch
Processor as an application. These include:
- Deploying the Step Processor as an application provides a better connection
between the Step Processor and the Personal Work Manager (PWM). When you complete
or close a step when the Step Processor is deployed as an application, the
application notifies the PWM that an event has occurred, causing the PWM to
automatically refresh its display. When you complete or close a step when
the Step Processor is deployed as an applet, the user must manually refresh
the PWM in order to refresh its display.
- Deploying the Step Processor as an application enables a session to be shared;
that is, the user is not required to login again. This is true if your application
class implements the IVWLaunchableApp interface, either directly or by extending
the VWBaseLaunchableApplication class as in the Java Step and Launch Processor
sample code.
- Deploying the Step Processor as an application forces popup dialogs to be
modal. This prevents users from doing something else outside the dialog box
while the dialog entry is unresolved. Deploying the Step Processor as an applet
does not provide dialog modality.
- Deploying the Step Processor as an application allows the application to
use the same instance of the Java plug-in. Deploying the Step Processor as
an applet requires the applet to create a new instance of the Java plug-in,
thereby slowing performance.