Before you start
This tutorial starts with a brief refresher on the basics of the architecture and components of the Informix Web DataBlade Module to show you how they all work together in a Web-enabled database solution. Then, the core of the tutorial explains the steps you take to install and configure the Apache (2) Web server on Linux or UNIX to get it to work with the Informix Web DataBlade.
In this tutorial, you will
- Get an introduction to the basic elements within the architecture of an Informix Web DataBlade application on UNIX or Linux
- Install the Informix Web DataBlade product in both the database server and the Web server machines
- Configure a database in Informix to store and serve dynamic Web pages
- Run the Websetup utility in both the database and the Web server to configure the Web DataBlade in them
- Configure the Web server Apache (2) to use the Informix Web DataBlade driver for a specific virtual directory that corresponds to the Web DataBlade Admin Tool
The Web DataBlade Module Admin Tool is one of the few pre-built dynamic Web applications, developed in Web DataBlade, that is used to configure all the Web applications stored in a given database. You choose to install this tool when you run the Web DataBlade's setup utility (Websetup) against that database where you previously registered the Informix Web DataBlade.
Introducing the Informix Web DataBlade Module
The IBM Informix Web DataBlade module is a collection of tools and functions with components installed in both the Informix database server and the 3rd-party Web server that help to ease development of intelligent, interactive, and dynamic Web-enabled Informix database applications.
Using the Informix Web DataBlade, you can build Web pages using your preferred Web/HTML development tools and embed the specific code for dynamic database transaction and query processing. You write these dynamic pieces in what are called Web DataBlade tags — similar in syntax to the normal HTML tags.
When a Web client requests a page, Informix retrieves the Web page from where it is stored in a database and resolves (or ‘explodes’) these pieces of dynamic database code in Web DataBlade tags at runtime, replacing those tags by their results formatted in the form of HTML code, and leaving the rest of non-Web DataBlade code of the page intact. Therefore, at the end, Informix returns the Web server a pure HTML page where the database-related pieces were resolved on the fly, while the non-database pieces were left untouched by Informix. The Web server can understand the resulting Web page it receives back from Informix. The Web server then returns this page — actually served by Informix — back to the Web client who made the original request.
You can have queries (SELECT statements), but also other types of processing (such as INSERT, DELETE, UPDATE, execute procedure/function) within the Web DataBlade tags. In addition to these SQL tags, this DataBlade provides you other tags and functions to dynamically manage variables, session-persistence, loops, conditions, application processing flows, and errors.
The original unresolved Web page code that combines non-database or normal HTML tags (non-Web DataBlade tags) with dynamic database-processing tags (Web DataBlade tags) is called an AppPage and is stored as an HTML data type object in an Informix table inside a database where you have registered the Informix Web DataBlade using the Blade Manager (bladiemgr) tool. When you register the Web DataBlade into a database, it creates the HTML data type (which can be seen as a CLOB or LVARCHAR) and all the functions to manage it inside that database.
Although the AppPages are stored in a database with a registered Web DataBlade module, these pages can contain remote or distributed SQL and transaction processing against other transactional databases that do not have the Web DataBlade Module registered on them.
Every single AppPage is processed within a transaction: Either all the database-related code within that page is successfully processed, or it is all rolled back. This ensures that you will not have different levels of success and failure for pieces of a single page request. The success of the page is an atomic matter for the Informix Web DataBlade. In addition, you have the ability to determine how to handle a failed database operation in your Web application — for example, sending a specific message back to the user or taking an action. One consequence of this fact is that Web DataBlade works with databases that support transactions (logging mode enabled).
Figure 1 illustrates how an Informix Web DataBlade dynamic web page (AppPage) looks like at every resolution stage. It first shows how a typical Informix Web DataBlade AppPage looks before it's been resolved by a Web client request with HTML and Informix AppPage tags. Then it shows the page once Informix returns it as resolved with only HTML tags, and, finally, the last box shows how the same page would be displayed by the Web browser.
Figure 1. Resolution stages of an Informix DataBlade dynamic Web page


