informix
DataBlade Developers Kit User's Guide
Getting Started with DataBlade Module Development

Developing Your DataBlade Module

Developing your DataBlade module is an iterative process that involves creating objects in BladeSmith, generating code, editing and compiling code, and testing and debugging code. When you identify errors, you must repeat the process to correct errors. DataBlade development can be iterative in another way: you can create objects in BladeSmith one by one, coding and testing each one before creating the next. When you are finished developing your DataBlade module, you package it for distribution.

To create your DataBlade module

  1. Create a project in BladeSmith.
  2. See Creating a New Project for more information.

  3. Define the contents of your DataBlade module in BladeSmith.
  4. See Creating DataBlade Module Objects for more information.

  5. Generate DataBlade module code in BladeSmith.
  6. See Generating Files for more information.

  7. Edit and compile DataBlade module code.
  8. See Editing and Compiling DataBlade Module Code for more information.

  9. Debug your DataBlade module code.
  10. See Debugging Your DataBlade Module for more information.

  11. Repeat steps 2 through 5 until your DataBlade module is complete and the code functions properly.
  12. Test your DataBlade module code.
  13. Run generated functional test scripts on UNIX or on Windows NT with a UNIX emulation program. For instructions for UNIX, see Performing Functional Tests. For instructions for Windows NT, see Performing Functional Tests on DataBlade Modules.

  14. If necessary, repeat steps 4 through 7 until your DataBlade module is complete and the code functions properly.
  15. Package your DataBlade module with BladePack.

The following diagram illustrates the basic steps in DataBlade module development and lists the tools you use for Windows NT, UNIX, and Java.

Figure 1-1
DataBlade Module Development Cycle

Editing and Compiling DataBlade Module Code

If you are developing a DataBlade module in C or C++, you use Microsoft Visual C++ 6.0 to edit and compile your source code on Windows NT.

If you are developing a DataBlade module in C, you can use any standard UNIX development tool and compiler to edit and compile your source code.

If you are developing a DataBlade module in Java, you can use any standard UNIX or Windows NT development tool to edit your source code. Use the JDK 1.1.x compiler to compile it.

For more information about programming and compiling, see the following chapters:

Debugging Your DataBlade Module

Debugging a C or C++ DataBlade module consists of the following general steps:

  1. Install the DataBlade module on the database server.
  2. Set breakpoints in your source code file.
  3. Start and attach the debugger to the database server process.
  4. Register the DataBlade module in your test database.
  5. Run SQL queries (unit tests) to test the source code marked with breakpoints.

If you are debugging C or C++ DataBlade module source code on Windows NT, you use Microsoft Visual C++, the DBDK Visual C++ Add-In, and the IfxQuery tool. The Debug DataBlade Module command of the add-in installs the DataBlade module on the local database server, starts the debugger and database server, and calls IfxQuery to register the DataBlade module and run the unit tests that halt at breakpoints in the source code. The Debug DataBlade Module command functions only if the database server is installed on the same computer on which you are debugging.

For more information on debugging C and C++ code on Windows NT, see Chapter 10, Debugging and Testing DataBlade Modules on Windows NT.

If you are debugging a DataBlade module on UNIX, you must install the DataBlade module, start the database server and debugger, register the DataBlade module with BladeManager, and use DB-Access to execute SQL statements that halt at breakpoints in the source code.

For more information on debugging C code on UNIX, see Chapter 9, Debugging and Testing DataBlade Modules on UNIX.

Debugging a DataBlade module written in Java consists of the following general steps:

  1. Install the DataBlade module.
  2. Start the database server process.
  3. Register the DataBlade module in your test database.
  4. Run SQL queries (unit tests) to test the source code marked with breakpoints.
  5. Examine the Java log file for errors.

For more information on debugging Java code, see Debugging and Testing DataBlade Modules Written in Java.

Packaging Your DataBlade Module

With BladePack, you can create an interactive installation program for the following environments:

You must include the generated SQL scripts and all the shared library files you produced when you compiled your DataBlade module source code. However, consider also including:

See Chapter 11, Using BladePack, for more information.


DataBlade Developers Kit User's Guide, Version 4.0
Copyright © 1999, Informix Software, Inc. All rights reserved