The third approach to programming with DP4 is to write "pure" DP4 program. In a pure DP4 program you use the DP4 database API and user interface API. The only other APIs you use are those that are part of the standard for the language you are using (though in C other files are usually created and accessed using DP4's Unix-like file I/O functions, and not ANSI C functions). Here are some of the advantages of this approach:
The DP4 API is supported on a very wide range of platforms, from Windows CE right up to AIX and HP/UX. In future it can be ported to any platform that comes with an ANSI C compiler and a sufficiently powerful operating system. DP4 programs written many years ago for MS-DOS can be recompiled to run on the latest version of Windows or Linux.
The DP4 user interface API is very abstract - a program is not concerned with things such as the size of the screen, whether or not there is a mouse or other pointing device, what language the user interface appears in. The user interface is contained in "maps", stored on a DP4 database. These are edited separately from the program, and you can make significant changes to the user interface without making any changes to the executable part of your program. This level of abstraction brings its own benefits:
The same DP4 executable can run with either a text based or a full GUI user interface ( the text based user interface allows your program to be run through Telnet or a similar protocol).
The user interface of a DP4 program may not even be running on the same computer as your program - using the DP4 thin client a Unix program can appear to a user of a Windows computer exactly like a regular Windows application.
DP4 programs can interact in a device independent way with specialised hardware such as MSRs, specialised printers, customer displays.