|
By Greg Grisham
ASIS offers you many methods to get your Business BASIC
data/application into a Web browser: Open Database and Java Database Connectivity, the Basic Web Utility, Sockets and BBj®.
Each method has unique features and benefits to lend to your particular application. Some require additional tools and others,
specific configuration. Here, we'll discuss the features of each and how they are configured.
| The First Method: ODBC and JDBC
|
Open Database Connectivity (ODBC) is one of the most common access points to any database. It is an established set of
connection criteria, and a large number of data/access reporting tools designed to work with ODBC are available in the market.
Java Database Connectivity (JDBC) is quite similar. But where ODBC requires a Win32 extraction, JDBC is Java based and does
not. Another feature of the ODBC/JDBC model is that you can extract data for a Web application while internal users can use
the same interface for data reporting.
The steps to configure an ODBC/JDBC-type of Web setup include:
- Creation of a Data Dictionary: you can locate the Data Dictionary anywhere on the network, but it must be consistently accessible.
- BBj Services: BBj Services contains the BBj Data Server, which itself includes a query engine that manages SQL data requests.
- ODBC/JDBC Client: the ODBC client (Microsoft Windows) is a small DLL and generally needs to reside on the same system that contains the requester application. JDBC requires only the necessary Java configuration information to point the application to the BBj Services system.
- Web Application: the Web application can be something custom-written in Perl or Java. It can also be any one of the packaged Web application toolkits designed for ODBC/JDBC (for example, Thin Web).
| The Second Method: The Basic Web Utility
|
The Basic Web Utility (BWU) is a set of Business BASIC programs that facilitate generating active HTML pages using CGI (Common
Gateway Interface). CGI comes with most of the popular Web servers. If your need is form-based data presentation and
collection, this tool is quite powerful. Furthermore, it is written entirely in Business BASIC. You do not need to learn any
other language. The BWU works with UNIX and Windows Web servers and is free with the purchase of PRO/5®, Visual PRO/5® and
BBj®.
Here are the configuration steps using an Apache Windows Web server and the BWU. Download and install the Apache Web server from www.apache.com. For the purposes of creating a demo on one machine, just accept the defaults.
- Edit the STDCGI.BAT file found in the BWU folder:
set BBPROG=c:\basisdemo\bwu\test.bbx
set BBEXEC=c:\basisdemo\vpro5\vpro5.exe
set BBCONFIG=c:\basisdemo\bwu\webconfig.bbx
set BBTERM=T4
**The TEST.BBX program is supplied and can be reviewed for easy duplication/modification.
**The WEBCONFIG.BBX is a simple config.bbx file. The critical entry is:
alias T4 syswindow""INVISIBLE
- Make sure the Apache service has been started.
- From the browser, open: http:///cgi-bin/stdcgi.exe. This will
cause the STDCGI.BAT contents to be referenced (that is, the program identified in BBPROG) and the resulting HTML to be
displayed.
A number of examples are in that folder that demonstrate subsequent requests as well as data-input capturing. We also have
extensive documentation available in the same directory for enhancements.
| The Third Method: Sockets
|
While sockets have many uses, socket communication is a natural fit for Web communications because both use TCP/IP. The
concept is to write "listener" code in Business BASIC. This code listens on a specific port and then reacts to input coming
from that port. You can develop the requester, or front-end code, using any number of tools on the market. Generally, you
would add some gateway code as a security layer between the listener and the front end. This is a powerful model in that the
listener/requester relationship does not have to be a one-to-one relationship. One listener program can react to any number
of requesters, and a requester can select or default to other listener programs.
|
Sample screens from DISC's online invoice query. DISC, a
leading supplier of business software for industrial distributors and manufacturers, designed its application service provider
(ASP) e-business solution using sockets, Java and XML. The back-end query program uses PRO/5® socket
functionality.
|
DISC's Web-application architecture. A powerful feature of
this use of sockets is that the data can reside in remote locations while the application code is local and easily maintained.
Designed specifically as an ASP e-business solution, queries submitted through the DISC application access live Customer
databases.
BBj is the culmination of all of the other methodologies with the addition of the Thin Client capability. BBj has ODBC/JDBC
built into the data server. BBj can communicate with CGI scripts. BBj supports socket communication. If the need is for
field-level data validation with a high degree of interactivity, this meets that need elegantly. The primary concept is that the
Thin Client actually runs in the browser. This allows your application to execute just as it would from a hard-wired
connection. Much like with ODBC, there is the additional benefit of being able to execute the Thin Client from an icon (as in
a LAN connection).
|
Two screens from Emque's new GUI accounting package for the
commercial construction industry. The application runs in BBj, using BBj's Thin Client in a Web browser. The New York-based
company plans to host the application for Customers.
Above is Emque Consultants' Accounts Payable Invoice Entry
with batch control, inter-company and job-cost posting and all related functions to this process on one form. At right,
Accounts Receivable Ageing of open invoices by either Client or Job, with the ability to sort each grid column and cut/paste
the grid results to Microsoft Excel spreadsheets.
|
|