Brought to you by EarthWeb
ITKnowledge Logo Login Graphic Click here to enter the VB Zone
Click here to enter the VB Zone
ITKnowledge
Search this book:
 
Search the site:
 
EXPERT SEARCH ----- nav

EarthWeb Direct

EarthWeb Direct

EarthWeb sites: other sites

Previous Table of Contents Next


Another approach is the three-tier architecture, which is discussed in greater detail later. While some of its benefits were already explained, this approach solves what might be the applet’s biggest problem. Eventually, the applet makes a connection to the third tier and requests or calls an action on a particular object. This request should trigger a conversation between the third tier and the database management system. In this case, connection information like database identification may be excluded from the applet’s code. Figure 4-5 depicts such a three-tiered architecture.


Figure 4-5:  Three-tier design.

Java stand-alone applications are suitable within intranets and are deployable to specific users across the Internet, provided those users have access to some kind of parallel file transfer program. These applications run trusted code, are allowed to access the local file system, and open network connections to arbitrary hosts, just as normal applications do. Figure 4-6 represents the parts of a stand-alone application.


Figure 4-6:  The parts of a stand-alone Java application.

ODBC Versus Specific Drivers as Subprotocol

ODBC is available on a wide variety of platforms, including Windows, Unix, and Macintosh environments. This wide use is not enough to make a Java-based project totally portable, but it is sufficient in many cases.

Using an ODBC leads to the same problem of deploying a non-Java underlying layer. It is very difficult to use such solutions on devices such as pure Network Terminals, but you may consider using an ODBC bridge or a native driver during development tests or within an environment known to be stable or not meant to evolve.

The reasons such solutions are difficult to use are:

  ODBC is a native component dependent on the platform
  ODBC uses a local registry or configuration file to look up data source names
  ODBC uses native drivers that are dependent on the platform
  ODBC is software that must be administered on each client platform separately

On the other hand, a full Java native-protocol driver, eventually using a third tier that does most of the job, offers these benefits:

  It is independent of the platform it is running on
  It uses a universal mechanism to name data sources — URLs
  It may be upgraded automatically

Summary

This chapter discussed the mechanisms used by JDBC, its programming interfaces, and some typical uses of JDBC.

The next chapter explains how to program with JDBC.


Previous Table of Contents Next
HomeAbout UsSearchSubscribeAdvertising InfoContact UsFAQs
Use of this site is subject to certain Terms & Conditions.
Copyright (c) 1996-1999 EarthWeb Inc. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.