DBMS, February 1996
DBMS Online: C/S Developer By David S. Linthicum

ProtoGen+ Goes Spiritual

ProtoView Development Corp.'s ProtoGen+ Workbench lets you do 3GL development at 4GL speed.

Contrary to popular belief, a lot of 3GL client/server application development is going on out there. Despite the drawbacks (such as an extended learning curve and development cycle) of using 3GLs, including C and C++, many development shops consider 3GLs a stable and portable application development platform.

The key to successful 3GL client/server development is not so much the skill of the programmer as it is the selection of the right suite of tools and object libraries for the job. It's just not practical to develop a 3GL application from scratch. Several products can take the sting out of 3GL client/server development, as well as accelerate development to the point where they close in on the 4GLs.

With release 5.0, ProtoView Development Corp.'s ProtoGen+ Workbench continues to wrap the hostile world of 3GLs and 3GL compilers into a user-friendly package. This month, I take a look at ProtoGen+, one of the tools that provides 3GL development at 4GL speed.

Features and Functions

ProtoGen+ Workbench is a high-level, interactive application designer and code generator. It consists of several subsystems of ProtoGen+ products, including ViewPaint, SQL View, and Menu Designer. The ProtoView libraries let developers design, prototype, and develop all types of user interfaces that are easily connectable to all types of database servers, including Oracle, Sybase, Informix, and other databases with ODBC access.

Using Workbench, you can create and link together several components to form an application. You may also test as you go, using an animation facility that lets you determine how the application behaves before you commit it to a generator and compiler. After you have designed and tested a ProtoGen+ application, you can generate the 3GL code in one of several target languages. (See Figure 1.)

You have the option of changing the source code to customize an application further, as well as compile and execute the newly generated code using third-party compilers and debuggers. For instance, ProtoGen+ supports Borland C++, Microsoft Visual C++, and Symantec C++, and it can generate code for both Win16 (Windows 3.1) and Win32 (Windows 95 and Windows NT) applications. With the addition of Win32 support, ProtoGen+ lets you take advantage of the multitasking and multithreading capabilities of Windows 95 and Windows NT. If you don't like C or C++, you can generate Pascal code for Borland's Pascal with Objects and Turbo Pascal. ProtoGen+ can generate ANSI C code for portability, or it can generate code that is specific to a compiler's native libraries such as Borland's Object Windows Library (OWL) or Microsoft's Microsoft Foundation Class (MFC) library.

You can use Workbench as the master control center for the ProtoGen+ application development systems. From Workbench you can launch other subsystems such as Menu Designer, the ViewPaint screen painter dialog editor, SQL View, the code generation modules, and source code editors. You can do everything from the Workbench, including designing, testing, compiling, and running an application.

Workbench also provides an environment in which you connect the various application components to form the application and the resulting generated application source code. Using Workbench, I integrated my data-entry screens, child windows, menu, and MDI windows into a final test application. I could also connect screens and dialogs using menus, icons, bitmaps, and pushbutton controls. Having generated the code, I accessed and modified it from Workbench using an integrated source code editor. (See Figure 2.) ProtoGen+ does not let you integrate an external code editor, but you can certainly edit the source files with any ASCII editor.

For those of you who think that code generators give you only a one-time shot at generating the final application, you're wrong. ProtoGen+ provides flexible maintenance mechanisms that let you lock portions of the code, allowing the customized code to survive future code generations.

Generations of Generators

Last reviewed in DBMS in June 1994 ("Hands On," page 34), ProtoGen+ provides several new features in version 5.0. It's clear that ProtoGen+ is targeted at the new 32-bit world of Windows 95 and Windows NT. ProtoGen+ 5.0 provides 32-bit code generation as well as new visual tools for building graphs and help files. Also, ProtoView has not forgotten about database connectivity. It provides new 32-bit ODBC drivers for Windows 95 and Windows NT. The ODBC access is automatic with the code generation. You do not need to learn or use cryptic middleware APIs such as ODBC or native database middleware.

Other new features include a ProtoView Programming Assistant (PVAssist), the ability to create DLLs, incremental code generation, and support for Intersolv's PVCS change management system. PVAssist is an editor that finally provides developers with a professional-quality source code editor integrated with ProtoGen+.

The ability to create DLLs directly from ProtoGen+ enables developers to break down large applications into smaller modules and components. It also allows applications to consume fewer resources. DLLs enable developers to reuse application components from application to application.

The incremental code generation lets developers generate source code for only those files that require updating. This provides faster code generation and compilation, and thus higher developer productivity. For instance, when I changed a small part of my test application, ProtoGen+ generated only the code files required to make the change; it took just a few seconds. When I decided to go with another memory model (that is, from large to huge), ProtoGen+ generated all new source files and forced a complete compile of the application.

Source code control is becoming a bigger issue as development projects move from one or two developers to five to 20 developers. With the new support for PVCS, ProtoGen+ provides version control information -- including size and timestamp --directly from its Manage Application Files screen.

Subsystems

In addition to Workbench, which is the mission control of ProtoGen+, the package also has several subsystems. Developers must understand how each subsystem works. The major subsystems include the Menu Designer, ViewPaint, ProtoView Screen Manager, WinControl, and SQL View.

ProtoGen+ provides a Menu Designer that lets developers put menu resources into a menu file. The Menu Designer supports predefined menu pop-up templates for File, Edit, MDI Windows, and Help. The templates provide a starting point from which you can create an application; you may also define your own menu pop-up templates. The purpose of the Menu Designer is to help you create cascaded menus using grayed and checked items as well as accelerator keys and menu breaks for ProtoGen+ applications.

The ViewPaint dialog editors let you define the user interfaces that make up the application using drag-and-drop form design. (See Figure 3.) Although this type of GUI form design facility is typical of many tools, I found ViewPaint's offering of controls somewhat limited; I would like to see a palette that's easily extensible via OCXs. Nevertheless, you'll find enough controls for basic applications, and you have the option of extending the palette by loading additional proprietary controls found in DLL files provided by ProtoGen+ or other vendors.

ViewPaint lets you establish data validation criteria for the controls on the dialog screen. You can use range validation, choice checking (that is, verifying that the user's entry is in a list of valid choices), table look-ups, and mandatory fields. ProtoGen+ developers can also set up field method strings that provide a way to associate data with ProtoGen+ objects, thereby controlling their behavior. I could also elegantly display error messages and define how such messages should appear on the screen. Other features include color and font control, as well as support for implementing error and help messages.

As an option from the ViewPaint palette, ProtoGen+ provides a DataTable control. The DataTable control is a window class that can manage, display, and edit rows, columns, and cells of data using a spreadsheet approach. I found the DataTable control useful when displaying the values of two-dimensional arrays or for displaying an answer set. The DataTable control is also available in a VBX version for use in Visual Basic and other applications that support VBXs.

The ProtoView Screen Manager acts as a functional layer between Windows and your application. The ProtoView Screen Manager replaces the Dialog Manager that's built into Windows, and it has more features and control than the Windows Dialog Manager.

WinControl is an expandable DLL containing proprietary Windows custom controls. ProtoGen+ grabs these controls as developers define a ProtoGen+ application. The library (in the winctl.dll file) provides most of the functions you'll need when obtaining, formatting, and editing data entered by the user. In addition to the field controls, WinControl also contains several useful utility functions that ease ProtoGen+ application development. Utilities provided with WinControl include text drawing, field editing, mouse processing, and data conversions.

SQL View is a development tool that works with ProtoGen+ and the ProtoGen+ subsystems, providing data access from ProtoGen+ applications. At design time, SQL View provides the necessary functions for connecting a ProtoGen+ application to several different databases. At runtime, SQL View can provide a C and C++ API that offers database access. However, don't look for native database support here. SQL View accesses databases through ODBC.

Using ProtoGen+, I selected tables from my database and automatically generated a form with all the fields and labels associated with that table. It also automatically inserts Update, Inquire, and Delete buttons if you need them.

If you need to include reporting with your application, you'll be happy to know that ProtoGen+ bundles Crystal Reports (Crystal Computer Services Inc., a Seagate Software Company, Vancouver, British Columbia, Canada). Using the same ODBC access, you can generate professional-looking reports in no time, and call these reports directly from your ProtoGen+ application.

Hiding Complexity

ProtoGen+ is a unique tool. I can't really place it with the specialized 4GL tools such as PowerBuilder or Gupta SQLWindows. In some ways, it is like Borland's Delphi, which provides visual development and generates and compiles the resulting Object Pascal code. I certainly can't categorize ProtoGen+ as a 3GL either. It's a sophisticated code generator that produces database-aware 3GL applications for a variety of third-party 3GL compilers. Not only can it generate code, but it lets developers modify parts of that code directly in order to customize an application, and it still maintains the rest of the application using an easy-to-use application designer. You get the best of both worlds: 4GL-like speed for application design and implementation that qualifies ProtoGen+ as a rapid application development (RAD) tool, and the flexibility and efficiency of a 3GL such as C or C++. Also, ProtoGen+ can create Win32 applications, leveraging the growing base of Windows 95 and Windows NT workstations. The documentation is excellent, and you'll also find all the information you'll need in the ProtoGen+ Knowledge Base. This menu-driven hypertext help system provides useful information about how to use ProtoGen+'s various subsystems.

Of course, there are some issues to consider before you build an application using ProtoGen+. Despite the fact that ProtoGen+ generates most of an application for you, you must learn the underlying 3GL (C, C++, or Pascal) to build complex applications. The tool takes you only so far; sooner or later you'll have to dig into the generated code for all but the simplest applications. I see this as the biggest drawback. Second, the ODBC-only database access is convenient for ProtoGen+, but the lack of native database connectivity could limit your options. Still, ProtoGen+ should be applauded for providing 32-bit ODBC support for Windows 95 and Windows NT. Finally, I would like to see support for OCX controls from ViewPaint.

I see ProtoGen+ as a good tool for C, C++, and Pascal development shops that want to move to client/server quickly. ProtoGen+ is ready and willing to make that transition easy by generating most of the application code for you. Using ProtoGen+, you can generate the majority of the application code you'll need. The code is virtually bug free, and application execution using a true compiler is speedy. For those of you looking to impress your boss with lightning-fast 3GL client/server applications, take ProtoGen+ for a ride.


* ProtoView Development Corp., 2540 Route 130, Cranbury, NJ 08512; 609-655-5000 or fax 609-655-5353; http://www.protoview.com.
David S. Linthicum is a widely published author, speaker, and computer science professor, and technical manager with AT&T Solutions in Vienna, Virginia. You can email David at 70742.3165@compuserve.com, or visit his home page at http://ourworld.compuserve.com:80/homepages/D_Linthicum/.

FIGURE 1


--After you have designed and tested a ProtoGen+ application, you can generate the 3GL code in one of many target languages. You have the option of changing the source code as well as compiling and executing the newly generated code using third-party compilers and debuggers. For instance, ProtoGen+ supports Microsoft, Borland, and Symantec C++ compilers. In addition, you can generate code for both Win16 (Windows 3.1) and Win32 (Windows 95 and Windows NT) applications.


FIGURE 2


--Having generated the code, you can access and modify it from Workbench. ProtoGen+ provides flexible maintenance mechanisms that let developers place customized code within generated code. The customized code can then survive future code generations.


FIGURE 3


--The ViewPaint dialog editors allow developers to define the user interface. ViewPaint lets developers establish data validation criteria for the controls on the dialog screen.


Subscribe to DBMS and Internet Systems -- It's free for qualified readers in the United States
February 1996 Table of Contents | Other Contents | Article Index | Search | Site Index | Home

DBMS and Internet Systems (http://www.dbmsmag.com)
Copyright © 1996 Miller Freeman, Inc. ALL RIGHTS RESERVED
Redistribution without permission is prohibited.
Please send questions or comments to dbms@mfi.com
Updated Monday, November 11, 1996.