


For many COBOL programmers, graphical user interfaces, GUI environments, and GUI programming are new territory. Enhancing or adding a graphical user interface to an existing COBOL program raises many questions and issues. Before you begin, we recommend that you thoroughly consider the following basic questions:
1. To what extent will the program's interface change?
2. How suitable is the current interface to conversion?
3. What resources are needed for the project?
Extent of the interface changes
There is no simple formula for defining a good specification for a modernized user interface. The special needs of your application, the demands of your marketplace, and the resources of your business will combine to define a practical GUI specification. In this process we recommend that you explore the full range of options available to you, from the small, selective upgrade, to a full reimplementation project.
We recommend that you consider a phased upgrade approach to spread the cost and risk of changing the user interface (UI) over a longer period of time. Remember that ACUCOBOL-GT can support a mix of graphic and character-based screens. The phased approach gives you more time to learn GUI technology in general, and ACUCOBOL-GT GUI support in particular.
Don't forget to develop a test plan. Any significant changes to the UI will require careful testing. You may want some end users to help with testing and evaluation. Be sure to include your test plan in the project schedule and staffing estimates.
Suitability of the current UI to conversion
A careful study of your application's existing user interface implementation can make a huge difference in ensuring the success of your project and holding down costs. When it comes to modernizing the user interface, some programs are better suited and less costly to update than others. Here are some qualities to consider:
The easiest applications to convert tend to be those that already use the
Screen Section.
The most difficult programs to convert tend to be those in which the user
interface code is dispersed throughout the program, i.e., programs that do not use
the Screen Section, or do not organize screen processing code into separate
procedures. If your application fits that description and you are going to
undertake a large GUI upgrade project, it is nearly certain that it will be more
efficient to implement your new user interface with the Screen Section. Also
consider that Screen Section code is much easier to maintain over the life of the
application than is distributed UI DISPLAY and ACCEPT code. A large enhancement
project presents a good opportunity to move to the Screen Section.
However, if you're doing a small enhancement project that is confined to a small portion of your code, using individual DISPLAY statements to create and process your screen elements might be reasonable.
Programs that already include a menu bar, the old-style character-based pop-up
windows (subwindows), and support for the mouse, are well on their way to a modern user
interface. These elements are easy to upgrade and enhance to take advantage of
ACUCOBOL-GT GUI support. Note, however, that just because an application already
includes this functionality does not mean that there won't be substantial work in adding floating windows and controls.
Evaluate your existing, character-based user interface screens for translatability into the graphical model. Many text-mode screens make dense use of the
screen. In contrast, graphical screens tend to be more open, having more white space and fewer fields. Also, graphical objects tend to take up more space on the
screen than their equivalent text-mode objects (mostly due to the boxes used to
frame controls). It may require a lot of work to reformulate your character
screens into attractive, functional graphical screens. This problem is just as
challenging for applications that already make use of pop-up windows and
menu-bars as for those that don't.
Recommendations
Implement your GUI in the Screen Section.
To control the size and cost of your project, execute it in phases.
If suitable, allow a mix of character-based and GUI screens (i.e., add new
graphical screens and retain some of your existing text-mode screens).
Redesign your screens to make them less crowded and more consistent with the
established look of the GUI environment.
Formulate a test plan and allocate time to execute it.