Application Clients
Application Clients
Applets
A web page received from the web tier can include an embedded applet. An applet is a small
client application written in the Java programming language that executes in the Java virtual
machine installed in the web browser. However, client systems will likely need the Java Plug-in
and possibly a security policy file for the applet to successfully execute in the web browser.
Web components are the preferred API for creating a web client program because no plug-ins
or security policy files are needed on the client systems. Also, web components enable cleaner
and more modular application design because they provide a way to separate applications
programming from web page design. Personnel involved in web page design thus do not need
to understand Java programming language syntax to do their jobs.
Application Clients
An application client runs on a client machine and provides a way for users to handle tasks that
require a richer user interface than can be provided by a markup language. It typically has a
graphical user interface (GUI) created from the Swing or the Abstract Window Toolkit (AWT)
API, but a command-line interface is certainly possible.
Application clients directly access enterprise beans running in the business tier. However, if
application requirements warrant it, an application client can open an HTTP connection to
establish communication with a servlet running in the web tier. Application clients written in
languages other than Java can interact with Java EE 5 servers, enabling the Java EE 5 platform to
interoperate with legacy systems, clients, and non-Java languages.
The JavaBeans
TM
Component Architecture
The server and client tiers might also include components based on the JavaBeans component
architecture (JavaBeans components) to manage the data flow between an application client or
applet and components running on the Java EE server, or between server components and a
database. JavaBeans components are not considered Java EE components by the Java EE
specification.
JavaBeans components have properties and have get and set methods for accessing the
properties. JavaBeans components used in this way are typically simple in design and
implementation but should conform to the naming and design conventions outlined in the
JavaBeans component architecture.
Java EE Server Communications
shows the various elements that can make up the client tier. The client
communicates with the business tier running on the Java EE server either directly or, as in the
case of a client running in a browser, by going through JSP pages or servlets running in the web
tier.
Distributed Multitiered Applications
Chapter 1 · Overview
45