SilverBooks

Introduced in SilverStream 3.0, SilverBooks is a Web-based electronic commerce application that simulates an online bookstore. Users can interact with this application to purchase books from SilverBooks Corporation, a fictitious bookseller. There are two interfaces: an Internet and an Intranet.

This sample application resides in the SilverBooks3 database.

SilverBooks is written using Java servlets, which extend Web server functionality by responding to HTTP requests on URLs that are assigned to the servlets. One advantage of using servlets is that they are written entirely in Java and, therefore, work across platforms.

SilverBooks synthesizes a variety of state-of-the-art technologies in one full-featured application, including persistent session-level failover, enterprise JavaBeans, and credit card order processing. A feature called Behind the Scenes exposes these technologies for users in a context-sensitive way as they interact with SilverBooks.

This page covers the following topics:

    For more information about servlets, see Using Servlet Business Object in the Programmer's Guide.

Two interfaces   Top of page

The SilverBooks application provides two interfaces: An Internet and an Intranet. Each of these interfaces serves a different user base with functions tailored to their unique needs.

Internet   Top of page

The SilverBooks Internet component provides the following electronic commerce functions for the general public:

The SilverBooks internet is implemented using HTML pages that execute on the server. HTML is a technology that is more portable than Java in an internet environment where user configurations are not known and can run the gamut of technologies.

The Internet starts up by default on pgSilverBooks.html when you run the SilverBooks application. This home page provides access to search engines -- including full-text search -- for browsing inventory by various categories, to a mechanism for creating and querying accounts, and to a shopping cart for ordering products.

Intranet   Top of page

The Intranet is designed for internal users -- the employees of the SilverBooks corporation. Within the Intranet, SilverBooks employees can perform the following back office functions:

This corporate Intranet is implemented as a Java application running in SilverJRunner on a client machine. The application is launched from the form frmIntranet in the SilverBooks3 database. Java can be used here because users are internal and, therefore, their system environments can be configured to support state-of-the-art Java capabilities.

SilverJRunner is a pure Java dynamic application loader that can run in any Java 2 compliant environment. When running a Java application, SilverJRunner automatically downloads and caches the required SilverStream forms on the local hard drive. During this process, SilverJRunner automatically installs on the client machine any changes that were made to the application.

Technologies used in SilverBooks    Top of page

SilverBooks incorporates SilverStream technologies that solve a variety of application challenges, as summarized in this section. For more detailed explanations of the technologies that power this application, take a look at the SilverBooks Behind the Scenes component.

Credit card order processing   Top of page

The SilverBooks application is designed to work with an outside vendor, iTransact, for credit card order processing. The interface is an HTML form containing hidden and visible fields that is submitted to iTransact's CGI scripts.

This section describes how the process works and how to configure your system to exercise this functionality.

How credit card order processing works   Top of page

To build the HTML form and transmit the information to iTransact, Silver Books provide two servlets:

When an order is placed, an e-mail is sent to the customer and the merchant. A mail object listens for the merchant e-mail, parses it to find the credit card authorization, then inserts that authorization into SilverBooks.

How to configure your system for credit card order processing   Top of page

To try out credit card order processing in SilverBooks, you must set up a test account with iTransact and enable the mail object.

To set up a test account with iTransact:

  1. In a browser, go to iTransact's Web site at http://www.itransact.com/merchant/test.html and follow instructions.

    You will receive a merchant ID via e-mail.

  2. Start up the SilverBooks Intranet by running the form frmIntranet in SilverJRunner from the SilverBooks3 database.

    For more information on running the SilverBooks Intranet, see Getting started.

  3. In the Intranet form, select System Preferences from the Edit menu.
  4. Select the Use iTransact for Credit Card Processing check box, enter the iTransact merchant ID you just received via e-mail, and click OK.

To enable the mail object:

  1. Set up a new e-mail account for receiving credit card orders in the SilverStream Management Console (SMC).

    For more information about using the SMC, see Administration Overview in the Administrator's Guide.

  2. Open the mail object com.silverbooks.mail.mailReceiver by following these steps:

Behind the scenes   Top of page

SilverBooks includes a Behind the Scenes function that provides detailed, context-sensitive descriptions of the technologies underlying the forms and pages that make up this application.

To invoke Behind the Scenes:

  1. On a page, click the Behind the Scenes link on the banner:

  2. On a form, select the Display Behind the Scenes Window check box:

The Behind the Scenes window opens, as in this example:

Getting started   Top of page

To get started exploring the SilverBooks application, follow these steps:

  1. Install and run the SilverBooks3 database.

    The Internet home page opens in your browser, as shown:

  2. Interact with the SilverBooks Internet by:

  3. Launch the SilverBooks Intranet by following these steps:

  4. Interact with the SilverBooks Intranet by viewing order data, and updating information about books, authors, categories, publishers, employees, and customers.