Guardian Programmer's Guide

Table Of Contents
Guardian Programmer’s Guide 421922-014
21 - 1
21
Writing a Requester Program
Recall from Section 1, Introduction to Guardian Programming, that a requester/server
design has several advantages over the monolithic or unified program approach.
Specifically, requesters and servers provide modularity by allowing the requester
program to handle terminal I/O, while a server process provides database service.
Such a model makes it easy to provide additional service by adding a new server
process or to support a larger user community by duplicating requesters.
This section describes the various functions that are usually performed by a requester
program. A programming example at the end of this section illustrates these functions
using many of the procedures and techniques described in Sections 2 through 20 of
this manual. This section thereby provides a summary.
This section should be read with Section 22, Writing a Server Program, which provides
information about writing a server program. Section 22 provides three sample server
programs that interact with the requester described in this section.
Functions of a Requester
In a typical requester/server application, the requester handles all terminal I/O while
leaving the “back-end” database handling to a server process. The job of such a
requester process can be broken down into the following functions (see Figure 21-1):
Terminal interface
Field validation
Data mapping
Application control
The following paragraphs describe each of these functions.