NonStop Software

Building NonStop DOM Application Components

Previous Topic | Next Topic | Contents | Index
Getting Started Guide | Administration Guide | Reference Guide

Subtopics

Makefiles
Sample Programs

Here is a summary of the steps for building your program:

  1. Ensure that the env.sh file was loaded into the OSS shell environment. The env.sh file is loaded automatically when you start an osh session if you added env.sh to your profile file when you installed NonStop DOM.
  2. Run the NonStop DOM IDL compiler on all your IDL files to produce language-specific header files and implementation stub files. For example, to implement the object methods using C++, you use the following command:
    java nsdidl.Main -language C++ *.idl
  3. Do not modify the compiler-generated files. Write your own header file that includes the header generated by the IDL compiler. Implement the pure virtual functions that are declared in the IDL compiler-generated headers.
  4. Write the client program in the language of your choice. The language you choose for the client can be different from the language in which the objects are implemented. Your client program must include language-specific header files for the objects it will use.
  5. Compile all the source code files using c89 to produce .o files.
  6. Build the client and server executables by linking the .o files with the NonStop DOM runtime SRL.

Makefiles

The NonStop DOM sample programs use a make file to perform the steps involved in building an application. The make file describes the program dependencies in such a way that all you have to do is run the make command to build all the components of the application. For example, to build the "bank" sample application you type:

make bank

Sample Programs

The NonStop DOM product is shipped with a number of sample programs, such as the bank sample mentioned in this section. The source code for all the samples is in the $NSD_ROOT/samples directory. The samples vary greatly in complexity and illustrate how to use different NonStop DOM features, for example how to use the Naming and Event Services, how to use stateful and stateless objects, how to store application data in a NonStop SQL/MP database, and how to write multi-threaded applications. The directory for each sample contains a file called README, that describes how to build, configure, and execute that sample program.

Sample programs are written in C++.


Previous Topic | Next Topic | Contents | Top
Getting Started Guide | Administration Guide | Reference Guide
Bibliography | Glossary | Index
© Tandem, a division of Compaq. All rights reserved. Legal notices.