Overview of NonStop DOM Application Development
A distributed object application using NonStop DOM consists of three major types of components:
- Object classes
- Servers, each of which hosts one or more object classes
- Clients, which make use of objects in the servers
The same process can be both a client and a server; that is, a process can host objects and also make requests of objects in the same process or a different process.
This section provides an overview of the steps used in developing a simple client and a server. When a more complex application environment is developed, these same steps are used for the individual parts. What changes is the number of objects and the complexity of the interactions between the clients and the objects.
Although it is common to describe application development as though one developer controled of all the application components, object technology lets you develop discrete components without knowing the details of other components with which they interact.
Let's start with an example object interface specification, in stock.idl, and follow the process of developing a client and a server. The required steps are described below and illustrated in Figure 1.
- The CORBA Interface Definition Language (IDL) provides a starting point for the object implementation. The writer of an object class uses IDL to specify the object interface.
- The IDL specification is input to the IDL compiler.
- The IDL compiler generates the following types of files:
- A header file to include in client programs that use the object class.
- A C++ source file to be compiled and linked with client programs. This file contains client stubs.
- A header file to include in the program that implements the object class.
- A source file to compiled and linked with the implementation. This file contains server skeletons.
- The client application developer writes application code, which uses the object, so it includes the client header file produced by the IDL compiler.
- The client application code is compiled, producing an object file.
- The client stub code produced by the IDL compiler is compiled producing an object file.
- The two client application files are linked (usually with other object files) to produce a client program.
- The server implementation developer produces a object implementation header file based on information found in the server skeleton header.
- The server implementation developer produces the server main program and object implementation. Code must be written for each method declared in the IDL interface definition.
- The server implementation code is compiled, producing an object file.
- The server skeleton code produced by the IDL compiler is compiled producing an object file.
- The two server implementation files are linked (usually with other object files) to produce a server program.
- The server program is started. It uses the NonStop DOM ORB implementation contain in the NonStop DOM Shared Runtime Library (SRL).
- The client application program is started. It also uses the NonStop DOM SRL. It makes requests of the object hosted in the server and receives replies.
Figure 1. The Process of Developing a Client and a Server