informix
DataBlade Module Development Overview
Building a DataBlade Module

DataBlade Developers Kit Tools

Informix provides the following graphical user interfaces for creating, packaging, and registering DataBlade modules, as well as tools for debugging DataBlade modules on Windows NT:

BladeSmith

You use BladeSmith to begin creating your DataBlade module, such as defining its contents and generating files and source code. BladeSmith guides you through object definition with wizard pages. BladeSmith automates many of the tasks of object creation, such as writing the SQL statements necessary to define objects in the database.

Using BladeSmith, you create a project for your DataBlade module and then add or define the following types of objects for your module:

Each of these objects is summarized in Chapter 1, DataBlade Module Concepts.

After you specify the user-defined objects, imported objects, and files you want to include in your DataBlade module, use BladeSmith to generate the files you need for compiling a shared object file or dynamic link library, managing a DataBlade module in your Informix database server, testing object functionality, and creating installation packaging files. These categories of files are described in the following table.

Type of Generated File Description
Source code You use these files to create a shared library file. They can include source code files, header files, Visual C++ workspace and project files, and makefiles.
SQL script These files contain the SQL statements that support the DataBlade modules in the database system tables. They include prepare scripts that describe the DataBlade module and object scripts that describe the DataBlade objects.
Test You use unit test files to test your database objects while you code and debug your DataBlade module on Windows NT. You use functional test files to test the positive and negative operation of user-defined routines, opaque data type support routines, and casts when your DataBlade module is complete.
Packaging You use these files with BladePack to generate installation files and executables.

The generated source code files contain routine definitions. BladeSmith generates complete code for some routines, such as basic opaque data type support routines. BladeSmith generates code templates for other types of routines, such as user-defined routines. You must add code to these routines to implement the functionality you require. The areas of the generated source code that need modification are marked with TO DO: comments.

When your code is complete, you compile it into a file that the database server can interpret.

For instructions, see the DataBlade Developers Kit User's Guide or the tutorial in the on-line DataBlade Developers Kit InfoShelf.

BladePack

You use BladePack to create an installable DataBlade module package. BladePack uses the packaging project file created by BladeSmith as the basis for the installation package. The packaging file references the SQL scripts, shared object file, and other files required by the DataBlade module. The installation scripts ensure that all DataBlade modules created with the DataBlade Developers Kit can be installed in a similar way.

You can create installation packages for a UNIX installation or a Windows NT installation for InstallShield 3.1 or InstallShield 5.1. The options you have for your installation package vary with each type of installation. For information on your options, see the DataBlade Developers Kit User's Guide.

You can perform the following tasks with BladePack:

See the DataBlade Developers Kit User's Guide for more information.

BladeManager

You use BladeManager to register or unregister your DataBlade module in a database and to install or uninstall DataBlade module client files.

After you install a DataBlade module on a database server, you must register it in every database that uses the module. Registration involves executing the DataBlade SQL scripts to create DataBlade objects in the database and making the DataBlade shared object or dynamic link library available to the database server.

BladeManager checks for dependencies between DataBlade modules. If you have imported an interface from another DataBlade module, BladeManager registers your DataBlade module only after it confirms that the interface is registered in the database.

If you are upgrading your DataBlade module, BladeManager automatically unregisters the previous version.

You can also unregister any module by using BladeManager. BladeManager does not allow you to unregister a DataBlade module if there is another DataBlade module that depends on it or if any of its objects are in use by the database.

See the DataBlade Module Installation and Registration Guide for more information.

DBDK Visual C++ Add-In and IfxQuery

The DataBlade Developers Kit provides the following tools for debugging C and C++ code on Windows NT:

The DBDK Visual C++ Add-In is a toolbar you add to Microsoft Visual C++, Version 6.0, to aid in debugging. You must have Dynamic Server on the same computer as the DataBlade Developers Kit to use the debugging features of the add-in.

The IfxQuery tool is launched by the add-in from within Visual C++. IfxQuery runs the SQL unit test file in the active window in Visual C++.

The add-in and IfxQuery automate many of the steps necessary for debugging a DataBlade module. After you compile your DataBlade module in Visual C++ and set breakpoints in your source code, you can click Debug DataBlade Module.

The Debug DataBlade Module command performs the following steps:

  1. Checks if the DataBlade module is compiled (and compiles it, if necessary)
  2. If necessary, creates a new directory for the DataBlade module under the INFORMIXDIR\extend directory
  3. Installs the DataBlade module shared library file and SQL scripts in the INFORMIXDIR\extend\project.0 directory
  4. Shuts down the database server
  5. Starts the Visual C++ debugger and the database server attached to the Visual C++ debugger
  6. Launches IfxQuery, if the active window contains an SQL file
  7. If necessary, creates the database specified by the add-in
  8. Connects to the database specified by the add-in
  9. Registers the DataBlade module
  10. Executes the SQL statements from the unit test file
  11. Writes the results to an HTML file
  12. Launches the default HTML browser for your computer
  13. Displays the SQL results in the HTML browser

The first time you run the Debug DataBlade Module command for a DataBlade module project, the Properties dialog box appears, in which you specify the database server and database you want to use for debugging. You can also access the Properties dialog box with the Run Properties dialog box button of the add-in.


DataBlade Module Development Overview, Version 4.0
Copyright © 1999, Informix Software, Inc. All rights reserved