Main BASIS Page
Main Advantage Page
This Issue's Table of Contents

The Guts & Bolts of Going GUI
by John Schroeder
The Business of Going Gui Table of Contents Exponentially Bigger Markets: How to Make Money with BBj

"Going GUI" is a phrase that simultaneously brings tears of joy and pangs of fear to the Business Basic programmer. The joy of being able to answer your customers’ needs with a modern GUI product is often accompanied by the sheer terror of learning about all this GUI "stuff." Taking 10, 20 or even 30 years of legacy character-based programming skills and moving them into the modern world of GUI is scary.

Take heart! You do have to learn new skills, particularly in the way your code interacts with a user. But the basics of business management software, building orders, maintaining inventory, manipulating disk files—the so called "Business Rules"—have not changed. The application skills you have acquired in building applications for various industries are your best competitive edge for modern software. And the development tools offered by BASIS International handle the low-level details of building GUI interfaces and allow you to put your focus where it belongs: on the application. Application-centric development has always been a major strength of BBx®, and the BASIS Visual PRO/5® GUI development tools are no exception. With Visual PRO/5, the Microsoft Windows-based version of BBx, GUIBuilder, the GUI development environment, and ResBuilder, the GUI screen designer, you have all the tools you need to build modern GUI applications.

The BASIS Tools

Visual PRO/5
Visual PRO/5 provides the same familiar BBx development and run-time environment you have been using for years. It is enhanced to manage all the GUI objects and events required for GUI applications. With all the standard Microsoft Windows controls, such as push buttons, check boxes, list buttons, etc., along with the GUI extensions of the familiar BASIS INPUTE and INPUTN, Visual PRO/5 has all the elements needed to build and run modern Windows-based applications.

ResBuilder
ResBuilder is the BASIS graphical screen designer with which a programmer can create the GUI screens required for an application. You start with a blank window or form and add the necessary controls, such as the data-entry controls INPUTE or INPUTN, buttons like the familiar Windows-style OK and Cancel buttons, and other controls as needed. ResBuilder has several built-in tools to allow easy alignment of a group of controls, as well as easy copying and pasting of one or more controls on the window. Multiple forms can be defined along with child windows for specific data-entry elements. The TAB control can be used to place several "layers" of forms on the same area of the main window.

In ResBuilder, you format the GUI screen and define what events, such as the click-on list button, to which your program will respond. In addition, you can specify data validation criteria, such as an input mask or length, in the INPUTE and INPUTN edit controls. You can build one or more child windows and associate them with the tabs on a TAB control.

The resource file created by ResBuilder is similar to a data dictionary. In it are all the characteristics of a GUI screen. These data elements, describing in detail the form and behavior of the GUI screen, are then read into GUIBuilder and made available to the programmer.

ResCompiler
ResCompiler provides an alternate method of creating a resource file. Using a structured command language, a programmer can define the elements of a GUI screen in an ASCII text file, then pass that file to the ResCompiler to create a resource. The best use of the ASCII resource file and ResCompiler is for resources that can be generated by another program. A generator can be used in some cases to create a GUI counterpart to a character screen. Program generators that generate a character screen, such as report writers, can be modified to generate an ASCII resource file. The generated ASCII resource files can then be compiled by ResCompiler into resources that can be used in GUIBuilder or Visual PRO/5.

GUIBuilder
GUIBuilder is a high-level GUI development environment that provides a workbench with which a programmer can create event-driven programs. Using a resource, or screen definition file, created either in ResBuilder or ResCompiler, GUIBuilder provides the development framework where code is connected to the resource to build a GUI application. GUIBuilder allows you, the programmer, to assemble the pieces of code required for the job. These include the familiar Initialization and End of Job housekeeping routines that open and close files, define data structures, run final updates, etc. In addition, the code segments required to manage user events such as mouse clicks can be attached to specific events associated with the objects in a resource. The business rules and other common data processing routines are assembled or called in GUIBuilder as well. When the project is complete, all the elements are assembled by GUIBuilder into a Visual PRO/5 program.

GUIBuilder was written completely in Visual PRO/5, thus demonstrating the power of the underlying GUI technology available to the BBx programmer.

In this TechCon99 session, I’ll show you the current BASIS GUI tools in action. We’ll analyze real-world GUI programs built with these tools, discussing the methods used to create these programs. As you attend other sessions, realize that anything you develop in Visual PRO/5 today will run under our next generation, BBj, in the future. Graphical programs you develop for Microsoft Windows platforms now will be usable on graphical UNIX systems as well as on the World Wide Web with BBj. The investment you have made in Business Basic applications over the years can be carried forward into the year 2000 and beyond, into environments never imagined by the original Business Basic developers almost 30 years ago.

John Schroeder is BASIS’ Chief Technical Officer and has over 30 years of experience in software development and management in scientific computing, engineering design automation, business software, and compiler and language development. He is an expert at BASIS GUI tools and had a major influence in their design and development.

 
The Business of Going Gui Table of Contents Exponentially Bigger Markets: How to Make Money with BBj

Subscribe to The BASIS Advantage Magazine!

 
 
Copyright 1999, BASIS International Ltd. All rights reserved.
Terms of Use
.