Java Reference
In-Depth Information
Because it would not represent the way programmers and database
administrators use Java, you will not convert the BillPayer program in this
chapter to an applet. Due to security issues relating to applet constraints and
data integrity, most Web interfaces use a layer of security between the applet and
the data. As you read the next section, you will learn about the layers of security
and the client-server concepts typically employed by computer installations and
database administrators.
Client-Server Concepts
In the past, the Internet interface for businesses has been written in C++,
Visual Basic, or PowerBuilder. The database behind the interface has typically
been Microsoft Access or Oracle. The client is the computer providing the user
interface; the server , which is a computer that hosts a network or database, han-
dles data manipulation and connectivity issues. Client-server architecture is a
general description of a networked system in which a client program initiates
contact with a separate server program for a specific purpose. The client requests
a service provided by the server. This separation of the client and the server is
called a two-tier system . The two-tier system, also called a first-generation sys-
tem architecture, contains application logic typically tied to the client, with
heavy network utilization required to mediate the client-server interaction.
A second generation client-server system takes this a step further by adding a
middle tier to achieve a three-tier system architecture. In a three-tier system ,
the application is split into three parts: the user interface, the application server,
and the database server. This leads to faster network communications, greater
reliability, and improved overall performance.
With the advent of Java and the Internet, many businesses have taken a
multitier approach , in which data moving from a client to a server goes through
several stages. The middle tier is expanded to provide connections to various
types of services, integrating and coupling them to the client and to each other.
Partitioning the application logic among various hosts also can create a multitier
approach. This encapsulation of distributed functionality provides significant
advantages, such as reusability and, therefore, reliability.
In a client-server system, Java applets with their own objects and methods
create the interface. A Java applet has a distinct set of capabilities and restrictions
within the language framework, especially from a security standpoint. Java
applets can neither read nor write files on a local system unless special permis-
sions are assigned and accepted. Applets cannot create, rename, or copy files or
directories on a local system. They also cannot make outside network connec-
tions except to the host machine from which they originated.
Most businesses, therefore, create a client interface with HTML or a scripting
tool to allow users to enter data. The database itself is separated from the inter-
face by a Web server, usually complete with a firewall to protect the database
from the Internet. The program on the Web server that provides the connectivity
is in control. Sun Microsystems provides an application programing interface
(API) called the Java Database Connectivity ( JDBC ) that has its own set of
objects and methods to interact with underlying databases.
Search WWH ::




Custom Search