Using Advanced Program-to-Program Communication › Application Design
Application Design
An important aspect of APPC programming is the consideration of application design. The protocol and verb set provided by APPC does not dictate a specific mode of use and can be flexibly adapted to a number of situations. In this sense, the application's use of the APPC verb set should be considered as part of the overall application design, and this further implies that the application spans the conversation.
Thus what is ostensibly a single application can be split into two (or more) procedures which communicate using the NCL &APPC verb. This form of application lends itself well to client-server type roles. Commonly, the client procedure will act as the man-machine interface, providing the presentation aspects of the application.
The server procedure can deal with the data organizational aspects of the application, fetching and returning to the presentation procedure one or more records depending upon the request.
There are some important advantages in this approach:
- The code for handling the functional or presentation aspects is physically separate from the code for dealing with data organization aspects. This simplifies the processing required in each part, and assists future maintenance. For example, the server procedure could be completely replaced at any stage to handle a new database or file system.
- As the code is separate, the procedures can be executed in different systems without any change to the application. For example, the client end can always reside in a work station while the server end is in a host system. However, they can also execute within the same system. An additional advantage is that should a server procedure need to be moved to another system, for example if a database has been moved, then no code changes are necessary. Simple changes to the APPC Control Tables can be used to redirect transactions to the new system.
- Procedures are executed on demand. Rather than initializing a process to wait for work, the required procedure can be attached when a demand for its services is received.
More information:
APPC Client/Server Processing