Apple WebObjects 5 User Manual
Page 82

82
Java Client and Other Three-Tier Systems
Apple Computer, Inc. January 2002
C H A P T E R 6
WebObjects Desktop Applications
Client JDBC applications
use a fat-client architecture. Custom code invokes JDBC
on the client, which in turn goes through a driver to communicate with a JDBC
proxy on the server. This proxy makes the necessary client-library calls on the
server.
The shortcoming of this architecture are typical of all fat-client architectures.
Security is a problem because the bytecodes on the client are easily decompiled,
leaving both sensitive data and business rules at risk. In addition, this architecture
doesn’t scale; it is expensive to move data over the channel to the client. Also, client
JDBC applications access the datasource directly—there is server layer to validate
data or control access to the datasource.
JDBC three-tier applications
(with CORBA as the transport) are a big improvement
over client JDBC applications. In this architecture the client can be thin since all that
is required on the client side are the Java Foundation Classes, nonsensitive custom
code (usually for managing the user interface), and CORBA stubs for
communicating with the server. Sensitive business logic and database connection
logic are stored on the server. In addition, the server handles all data-intensive
computations.
The JDBC three-tier architecture has its own weaknesses. First, it results in too much
network traffic. Because this architecture uses proxy business objects on the client
as handles to real objects on the server, each client request for an attribute is
forwarded to the server, causing a separate round trip. Second, JDBC three-tier
requires developers to write much of the code themselves, from code for database
access and data packaging, to code for user-interface synchronization and change
tracking. Finally JDBC three-tier does not provide much of the functionality
associated with application servers, such as application monitoring and load
balancing, nor does it provide HTML integration.
The Java Client architecture, however, scales well since real data objects live on the
client and roundtrips are made to the server only for database commits and new
data fetches. Also, Java Client applications are designed to leverage custom
business logic which lets you to control which business objects are sent to the client
and to validate data from the client before committing it to the data store.