Skip to main content.

Web Based Programming Tutorials

Homepage | Forum - Join the forum to discuss anything related to programming! | Programming Resources

Web Database Developer's Guide with Visual Basic 5

World Wide Web Database Developer's Guide with Visual Basic 5


HTTP Server and Browser Components

The first three chapters of this book focused on using the Web and client/server technologies to access distributed data repositories. This chapter examines a few of the HTTP server and browser components that make up the Web and how they've brought about user-friendly GUI platforms for accessing data.

In the Beginning

Before the creation of the Web, users on the Internet came primarily from scientific and educational fields. Although the Internet was quite functional before GUIs came into being, it still was somewhat complex to use. Most interaction was text-based, but users could access other machines on the Internet in a variety of ways--through command-line programs such as Telnet, FTP, Gopher, WAIS, Veronica, and Mail. To the novice user, though, these interface programs seemed somewhat unfriendly.

When Tim Berners-Lee (credited with creating the WWW) first wrote his "Information Management Proposal" in 1989 and described his dream of a distributed hypertext system (later to become the WWW), this system was based on text-only ASCII files that appeared onscreen as 24 lines by 80 characters. This capability was deemed to be both sufficient and essential for the short term; the addition of graphics was an option. Today, full-fledged GUIs make accessing the vast wealth of data repositories a pleasure.

HTTP Servers

HTTP servers are based on the Hypertext Transport Protocol and provide access to distributed hypermedia documents, applications, and databases. HTTP is a stateless, object-oriented, application-level protocol that has existed since the early days of the WWW global information initiative. Why is HTTP considered a stateless protocol? Probably one of the major shortcomings of HTTP is its inability to maintain application information (sometimes called state) across multiple sessions. To overcome this limitation, you have to be creative with your HTML documents to pass state information between them.

HTTP servers operate under a request/response model in which a client establishes a connection with a server and submits a request. The server responds with a status line, including the message's protocol version and a success or error code, followed by a MIME-like message. This section presents a few of the major HTTP server applications available both commercially and as freeware products. (Other Web server resources are presented later in Table 4.1.)

NCSA httpd

NCSA httpd is an HTTP/1.0-compliant Web server credited with being one of the first HTTP servers available. NCSA httpd supports multiple schemes of authentication, including basic HTTP authentication, MD5 authentication, and Kerberos version 4 and 5 authentication. NCSA httpd software is available in both binary and source form. Although the NCSA httpd software is copyrighted by The Board of Trustees of the University of Illinois, users are granted a license, at no fee, to use the httpd for academic, research, and internal business purposes only.

RESOURCE: The complete set of NCSA httpd documentation is available online in PostScript format at 

Additionally, NCSA has put together a pretty good tutorial about the setup and configuration of NCSA httpd. The topics in the tutorial include directory indexing, Server-Side Includes, security, CGI configuration, imagemaps, WAIS index searching, virtual hosting, and "How To" guides describing the latest features in NCSA httpd.

RESOURCE: You can access the NCSA httpd tutorial online at 

If you're interested in learning about the features of a particular release, NCSA maintains an Upgrading NCSA httpd Web page at

Here is an NCSA list of precompiled executable platforms for httpd 1.5 (if your platform is not listed, you'll need to compile the source code): AIX 3.2.5

HP-UX 9.05

IRIX 4.0.5

IRIX 5.3

Linux 1.2.13, libc 5.0.9 ELF

OSF/1 3.0

SunOS 4.1.3/Solaris 1.x

SunOS 5.3/Solaris 2.3 SPARC

SunOS 5.4/Solaris 2.4 x86

SunOS 5.4/Solaris 2.4 SPARC

Ultrix 4.0

RESOURCE: NCSA provides an online, step-by-step approach to compiling httpd source code at 

RESOURCE: You can download the latest release and beta releases of the httpd software from the NCSA httpd home page at 

Apache HTTP Server

The Apache HTTP Server is maintained by The Apache Group and is derived from NCSA httpd 1.3. The Apache software is available free of charge and can be redistributed freely. The current release includes support for Database Method (DBM) authentication, customized HTML/CGI responses to server errors, multiple DirectoryIndex directives, unlimited numbers of Alias and Redirect directives, content negotiation, and multihomed servers.

RESOURCE: You can get technical support for the Apache HTTP Server through the following Usenet newsgroup:

Additionally, the Apache Group maintains a Majordomo List Server to keep users informed of new bug fixes, security fixes, and general news and information about the Apache Server.

TIP: List servers provide automated e-mail mechanisms to keep subscribers up to date on information pertinent to the specific list subject content. The mailing list apache-announce, for example, contains information about new announcements related to the Apache Web server.

You can subscribe to the apache-announce mailing list by sending an e-mail message to with the words subscribe apache-announce in the body of the message.

Here is a list of precompiled executable platforms for Apache Server:

A/UX 3.1

BSDI 1.1

BSDI 2.0

FreeBSD 2.1

HP/UX 9.07

IRIX 5.3



SunOS 4.1.3

SunOS 5.4

Unixware 1.2

RESOURCE: You can download the latest release of the Apache Server software from the Apache HTTP Server Project at 

Netscape Servers

Netscape Communications Corporation has designed several different Web servers and server components to support varying business and government needs. An entry-level server such as FastTrack Server is ideal for smaller businesses intending on simply publishing documents. For sites requiring more advanced features, such as security, dynamic web document generation through database queries, and document management, Netscape Enterprise Server is a better choice. FastTrack Server 2.0 Netscape FastTrack Server 2.0 was designed for businesses that are just getting started on publishing intranet or Internet documents. FastTrack Server not only includes setup wizards, which make it easy to install, but it also includes the Netscape Navigator Gold client product to help you design and implement your Web documents directly on the Web server platform. Versions of FastTrack Server are available for the Windows 95, Windows NT (DEC Alpha only), DEC UNIX, and IBM AIX operating-system platforms. FastTrack Server easily can be upgraded to the more advanced Enterprise Server, making it an ideal stepping stone for any business that wants to get its feet wet in the Web publishing arena.

RESOURCE: For more information on the Netscape FastTrack Server, consult the FastTrack Server home page at 

Enterprise Server Enterprise Server is Netscape Communications Corporation's most advanced Web server product. Many companies and large government agencies use Enterprise Server because of its support for features such as Secure Socket Layer (SSL) 3.0, Java and JavaScript, Simple Network Management Protocol (SNMP), client-side certificate support, and document revision control.

RESOURCE: For more information on the Netscape Enterprise Server, consult its home page at 

SuiteSpot SuiteSpot is Netscape's bundled suite of applications; it brings intranet development and deployment under a single product line. SuiteSpot includes these applications:

Microsoft IIS 3.0

Microsoft Internet Information Server (IIS) 3.0 is a Windows NT-based WWW server that incorporates WWW services, Gopher and FTP services, an Internet Service Manager, an Internet Database Connector, and the SSL. It also contains client browsers for Windows 3.11, Windows for Workgroups, Windows NT, and Windows 95.

IIS integrates well with the Microsoft BackOffice suite of products and includes the following features:

Using the Internet Database Connector, you can attach directly to Microsoft SQL Server, Microsoft Access, Oracle, Informix, Sybase, and other open database connectivity (ODBC) compliant databases. This built-in feature enables you to take advantage of elements such as stored procedures, triggers, and replication.

Other Web Server Resources

Additional HTTP servers have been ported to most major operating system platforms. Table 4.1 lists some of the Web servers and their platforms. If you're using a platform that isn't listed here, it doesn't mean that you can't run a Web server; it just means that you'll probably have to download the source code to a shareware HTTP server and compile it under your environment. Many shareware servers provide documentation about how to compile the source code.

Table 4.1. Web Server Resources.

Web Server Platform URL
Alibaba NT 95
Basis WebServer 95
CommerceBuilder NT
ConnectionServer 3.1
Fnord NT
FolkWebServer NT
HP3000 HP
Hype-It DOS
MDMA Solaris
NaviServer UNIX
OracleWebServer UNIX
Plexus httpd Perl
Purveyor NT
SIAC Webserver NT
Spinner UNIX
W3C httpd UNIX
WebSite NT

CGI and WinCGI

Through CGI scripts, the user (and the browser, for that matter) can interact with the Web server. CGI scripts are executable files (such as a DOS batch file, a UNIX shell script, a Perl language script, a C program, and so on) that allow dynamic communications between two applications.

WinCGI allows Windows-based Web servers and applications to communicate by means of INI-like files. The input request text of a WinCGI script is stored in a file by the Web server. The output response from a WinCGI script is stored in a file by the WinCGI script. Because the data stored in WinCGI scripts is INI-like, it can be retrieved with a Win32 API GetPrivateProfileString function call. The variables in the file are separated into the following seven sections:

Consider a database application interface to your Web server. As an end user of the application, you want to query and retrieve information as soon as it's available. Through CGI scripts, your Web server can query the database for information that you have requested and build the HTML code results on-the-fly for display on your Web browser.

There's no need to generate the HTML code whenever new documents or data is entered into the database. CGI scripts handle all that for you. You do have to write the CGI script, however. Once written, CGI scripts can provide end users with instant access to database updates. The next section discusses database-accessible CGI scripts more fully.

CGI has many benefits. One of them is that CGI enables existing applications to generate output (standard output, file output, and so on) that can be used as input to an HTML-generating CGI script. You don't need to rewrite existing code to generate HTML output; you simply have a CGI script execute your existing application, retrieve the output from that application, parse the output, and generate the HTML code. Talk about code reusability!

CGI scripts can provide output as simple as a list of users currently logged onto the Web server, or as complex as a system providing dynamically updated stock quotes. One good use of CGI scripts is to dynamically change the presentation of your Web documents each time they're accessed. Your CGI program could easily generate a random number used as an index into a database table of images, for example. Each time the CGI script is executed, a new image is displayed to the end user.

Database Gateway Software

Database gateway software is used to bridge the Web and database server environments. This does not mean that database gateway software uses the HTTP protocol to communicate with the Web server. Instead, it means that a Web server can use, as input for generating HTML-coded text, the output generated by existing database applications. Using gateways enables you to access rich document repositories to generate dynamic HTML output for display in the Web browser.

New Web database developers sometimes think that database gateway software is written in a new database language. This is not true at all. Remember that the Web server can use the output of one process as the input for another. This is also the case with most database gateway software. The output of the database gateway software can be used as input for generating the HTML code delivered to the user's Web browser. Because database gateway software exists in many formats and has existed since the first databases were developed, it's a perfect interface for bridging Web and database environments.

Web Browsers

As you probably already know, Web browsers are the end user's front-end interface to the Web. Web browsers communicate with HTTP servers for the transfer of hypermedia documents. This transfer can take place on the same machine (that is, both the Web server and client are co-located), within a local area network (LAN), across a wide-area network (WAN), and, most commonly, anywhere on the entire Internet.

The Web browser is responsible for receiving input from the end user, initiating document-transfer requests with Web servers, receiving the HTML-coded document from the server, and converting that same document into formatted output for display onscreen. Web browsers exist for virtually every operating system platform and are capable of communicating with all Web servers.

A Web browser's main function is to accept HTML input from a Web server and display the corresponding document based on the HTML tags included in the data. HTML 3.2 tags are discussed in more detail in Chapter 10, "An Overview of HTML 3.2."

HTML documents can contain hyperlinks. When clicked, hyperlinks cause the browser to contact the appropriate Web server for the document. Web browsers support predefined levels of HTML specifications. These specifications determine how the browser renders the HTML tags contained in the document. Because of the dynamically changing HTML environment, no two Web browsers support exactly the same levels of HTML conformance.

Just like Web servers, Web browsers come in many flavors and are supported on almost every hardware and software platform. Even though text-only browsers still are supported, most Web browsers provide a graphical front-end interface.

The following sections describe the three major Web browser applications, including some of the advanced features of each browser and features you will find most attractive. A final section presents a table of other Web browsers, the platforms to which they have been ported, and where you can access those products.

NCSA Mosaic

NCSA Mosaic is an Internet information browser and a WWW client developed at the University of Illinois at Urbana-Champaign. NCSA Mosaic was one of the first Web browsers, and it is responsible for the overwhelming support of the HTTP protocol in the WWW community.

NCSA Mosaic is supported on these software platforms:

RESOURCE:You can download the latest release of NCSA Mosaic, release 2.1, and previous releases of NCSA Mosaic from the NCSA Mosaic FTP Server at 

This section reviews some of the major features available in Mosaic 2.0, as well as some of the features added in Mosaic 2.1. Collaborative Sessions NCSA Mosaic collaborative sessions enable a Mosaic client to chat with other Mosaic clients, to link Mosaic sessions with other Mosaic sessions, to send files, and to exchange data with other collaborators. Collaborative sessions work on the client/server principle. Each Mosaic client contains a collaborative client and server that enable communication between the sessions. Mosaic manages collaborative sessions with a Collaborative Session window. Figure 4.1 shows a sample collaborative session. Advanced Hotlist Manager Advanced Hotlist Manager provides greater control over an end users' predefined favorite URL entries. These entries, called hotlists, can be alphabetized automatically and checked for validity (see the next section, "AutoSurf"). Figure 4.2 shows the default Advanced Hotlist Manager window. AutoSurf The AutoSurf feature enables end-users to validate the links of all entries in their hotlist selections. By default, the AutoSurf feature checks the links of the currently loaded document. However, you can execute the AutoSurf feature from the Advanced Hotlist Manager and validate all your hotlist entries, or you can validate entries in a specified hotlist folder. Figure 4.3 shows the NCSA Mosaic AutoSurf Setup dialog box.

FIGURE 4.1.A sample NCSA Mosaic collaborative session.

FIGURE 4.2.The NCSA Mosaic Advanced Hotlist Manager window.

Network Time-Out Network time-out enables the user to configure the amount of time the Web browser waits (in seconds) for a Web server to accept a connection. The default time-out value is 60 seconds. Preferences The Preferences dialog box gives users more flexibility in defining preferences for tasks such as document printing (see Figure 4.4). The Printing tab, for example, enables end users to specify options such as document title, document location, page counts, and date and time stamps that should be generated on the output document. Additional Preferences tabs are available for managing documents, news, directories, and windows preferences.

FIGURE 4.3.The Mosaic AutoSurf Setup dialog box.

FIGURE 4.4.The NCSA Mosaic for Windows Preferences dialog box.

Netscape Navigator

Netscape Navigator is an Internet information browser that enables users to retrieve and view WWW multimedia documents. Netscape Navigator is compatible with NCSA Mosaic and contains additional features not yet available in other Web browsers; it comes in three flavors:

Navigator Gold includes document-editing and management capabilities. Navigator Personal Edition includes setup and configuration for automatic dial-up connections to most of the popular Internet service providers.

This section reviews a few of the major features available in Netscape Navigator 3.0.

RESOURCE: You can download a 90-day trial version of Netscape Navigator from the Netscape Communications home page at

Multimedia Multimedia capabilities are included in Navigator 3.0 through Netscape's LiveAudio, LiveVideo, QuickTime Movie, and Live3D plug-ins. Users can embed standard sound formats such as AIFF, AU, MIDI, and WAV in HTML documents with LiveAudio. Through LiveVideo, Windows 3.1 and Windows 95 users can view embedded or linked AVI movies. The QuickTime plug-in enables Netscape Navigator to display QuickTime animation, music, audio, and video in a Web page while it's still downloading. Live3D provides Navigator 3.0 with 3D support for Virtual Reality Modeling Language (VRML) viewing. Interaction with text, images, animation, sound, music, and video are all possible with the Live3D plug-in. Progressive Rendering Progressive rendering enables users to download text and images simultaneously. The browser handles this by using multiple connections to the Web server. Each connection requests a different object (image or text). The real benefit of progressive rendering is that it appears to end users that the document is loading faster, because it enables them to see more of the objects and to access some links sooner.

Because multiple connections provide access to the data objects in parallel (rather than one at a time) in the order they appear in the document, however, they also increase the load on the Web server, ultimately slowing down the throughput on each of the multiple-connection sessions. Multiple connections, however, do not significantly affect download speed. Continuous-Display Scrolling By using the continuous-display scrolling feature, end-users can view the contents of a document before it fully loads. This capability enables end-users to make a more informed decision, based on whether to continue or terminate the loading process. Secure Socket Layer Using the SSL, Netscape Navigator provides security features that offer private communications with certified secure servers. The SSL provides data encryption, server authentication, message integrity, and optional client authentication for a TCP/IP session. Netscape Navigator supports the resource-access method https, which was created for specifying servers that support SSL.

Microsoft Internet Explorer

Internet Explorer is a WWW browser that integrates well with all Microsoft products. Even though Internet Explorer has been available for a shorter time than both Netscape Navigator and NCSA Mosaic, it has proven to be one of the best available Internet browsers. Internet Explorer 3.0 supports all HTML Level 3.2 tags as well as Netscape extensions tags, and even some of Microsoft's own extensions.

Internet Explorer is supported on all Microsoft Windows platforms and is available on the Macintosh platform.

RESOURCE: You can download the Internet Explorer browser from the Microsoft Internet Explorer home page at 

Here are a few of the major features available in Microsoft Internet Explorer 3.0:

Other Web Browser Resources

Additional Web browsers have been ported to most major operating system platforms. Table 4.2 lists some of the Web browsers and their platforms.

Table 4.2. Web Browser Resources.

Web Browser Platform URL
Arena X11
Candle Web X11
Cello Win3.1
EnhancedMosaic UNIX
NetCruiser Win3.1
NewtScape Newton
OmniWeb Next
WebExplorer OS/2
WebSurfer Win3. websurfer.html age/apps/
WinWeb/MacWeb Win3.1 browsers.html products/

Web Browser Interfaces to E-Mail

Mail support was one of the first neat features of Web browsers. You access Mail support through a dialog box to send e-mail messages to specified e-mail addresses. This address is specified in the HTML code with a hypertext link, identified as a Mailto resource (the Mailto resource is discussed in Chapter 10). After you click the hypertext Mailto link, the Mail dialog box appears. The Mailto resource is a very useful mechanism; end-users can interact directly with Web database developers on topics such as document design and layout suggestions, database-access questions, and general document-access issues.

E-mail interfaces became more advanced, enabling users of Post Office Protocol (POP) servers to access remote mail. With the addition of POP support in Web browsers, end users could retrieve e-mail from remote mail servers, organize e-mail documents through folder management from a common desktop environment, and control e-mail setup preferences.

Web Browser Interfaces to Usenet News

Another versatile feature of Web browsers is the integration of Usenet News support. Usenet News is a client/server application environment that uses the Network News Transfer Protocol (NNTP) to handle communications between Usenet servers and Usenet clients. Usenet News enables end users such as Web developers to subscribe to newsgroups that contain specific subject-related articles. Whenever a new article is posted to a newsgroup, all end users who subscribe to the newsgroup receive that article. Usenet News is a great way for Web database developers to stay informed about topics pertaining to their specific site requirements.

Previously, Usenet News readers (programs that access Usenet servers) consisted of standalone applications that managed Usenet groups and articles for the user. Today, most Web browsers have built-in support for Usenet News, enabling browser end users to access the full range of Usenet services. Support for Usenet News in Web browsers means that end users no longer need to have separate applications open to handle access to Usenet newsgroups.

CAUTION: Applications that support a Usenet News interface maintain a table or list of currently subscribed groups. They also maintain a list of previously read articles within each subscribed group. Because news-reader applications maintain their own tables and lists, the interoperability and management of groups and read articles is lost if different news-reader applications are used.

Netscape Navigator, NCSA Mosaic, and Microsoft Internet Explorer all have the capability to manage Usenet newsgroups and articles. Although the Usenet News interface windows of the three major Web browsers have subtle differences, they all provide the same support.

Table 4.3 lists Usenet newsgroups that offer information and support related to Web database development.

Table 4.3. WWW developer-related Usenet newsgroups.

Category Newsgroup
Database comp.databases
WWW authoring comp.infosystems.www.authoring.cgi
WWW browsers/servers
Programming language comp.lang.basic.visual.database
Web security

Bookmarks, Favorites, and Hotlists

Most Web browsers have one feature that enables you to save information on specific documents. In Internet Explorer, this feature is called favorites; in Netscape Navigator, it's called bookmarks; and, in NCSA Mosaic, it's called hotlists. This feature stores document lookup information that can save time when retrieving the document.

Bookmarks, favorites, and hotlists provide a shortcut retrieval mechanism for accessing Web documents. Most URL references in this book are set up by using Netscape bookmarks, for example. Having a readily available resource such as this makes tracking database updates, software updates, and new trends much simpler for Web database developers.


This chapter described the early specifications for Web browsers and how they eventually migrated into the Web browsers of today. Several of the major Web servers were presented, along with some of the other WWW components that interact with the Web server. You learned about the CGI interface--particularly its method of providing the Web server with a means of using the output from existing applications as the input to HTML generation.

You learned about database gateway software and how it bridges the gap between the WWW and data repositories. You examined some of the most common Web client applications in detail--especially some of the new features in each of those applications. Web browser interface tools that enhance the Web database development environment followed--specifically, the integration of e-mail and Usenet News as means for building a common Web environment.

Finally, you were introduced to bookmarks, hotlists, and favorites to facilitate quicker access to certain online documents.