Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesClient/Server C++: Write Fast, Run Fast


March 1997 / Reviews / Client/Server C++: Write Fast, Run Fast

The latest C++ development environments do rapid application development to simplify business database applications.

Rick Grehan

Stand back for the new breed of client/server development systems. These aren't the familiar fourth-generation language (4GL)-based integrated development environments (IDEs) with unwieldy run-times that your applications must lug around like backpacks. Quite the contrary: These new development systems, from Blue Sky, Microsoft, and Powersoft, are C++-based, ushering that language into a product market heretofore occupied only by the likes of PowerBuilder and Delphi.

Microsoft's entry, Visual C++ Enterprise Edition 4.2 (VC++EE), includes the ubi quitous VC++ foundation, which is topped with features aimed squarely at assisting in the construction of database applications. Blue Sky's Visual SQL 4.01 (VSQL) is an interesting attempt at symbiosis with VC++EE, providing what amounts to add-on tools and wizards to VC++EE that steer VC++ even further into the database lane. Finally, Powersoft's Optima++ Enterprise Edition 1.5 is its own interesting mixture of raw C++ programming power and database connectivity.

A note of clarification: To say that an application is a "client/server" application should speak only of its architecture -- that the application has been partitioned into client and server portions. Not so here; when I say client/server, I mean database client/server -- database applications with a GUI client and a database engine server. (Consequently, these are two-tiered client/server systems.) Business logic typically lives on the client, althou gh stored procedures and triggers on the server can manage much of the database-intensive business computing.

After spending more than a week using all three tools, I have concluded that Powersoft's Optima++ is the most useful, especially if you haven't already settled on another product for your client/server development. Optima++ strikes the best balance between wizardly hand-holding and on-the-metal programming. The product also makes it easier to reverse-engineer the code it automatically writes.

Common Denominators

The deliverable produced by all three products is a client/server database application written in C++, but I'm taking liberties in pigeonholing these tools that way. For example, although VC++EE's features lean heavily toward database application construction, the system is by no means limited to this. After all, VC++EE has at its heart a complete C++ development system. Similarly, Optima++'s core is the Watcom C++ compiler, and there's absolu tely no reason why you couldn't use Optima++ to build non-client/server programs that have nothing to do with databases.

VC++ already has substantial support for client-side construction, so the Enterprise Edition shifts its focus to server-side tools. It performs this shift by incorporating tools for editing and debugging a database's stored procedures from within the IDE. Meanwhile, Optima++ concentrates its attention on the GUI (i.e., client) side of an application with the aid of a clever RAD technology that's a help system crossbred with a code generator. And VSQL presents you with a roomful of wizards that carry you through the process of building the more-typical database applications (e.g., master/detail update screens) and does so while shielding you, as much as possible, from the underlying C++ code. It's like three climbers assaulting the same mountain along different trails; they all hope to arrive at the same peak.

VC++EE amounts to the Professional Edition of VC++ p lus several accoutrements useful in building database applications. Specifically, it adds SQL editing and debugging to the VC++ IDE. Also, the DataView pane -- available in the project workspace -- provides management functions and access into any databases you include in your project workspace.

Some warnings up front: If you want to have the VC++ IDE and SQL Server on a single machine, Windows 95 won't work (SQL Server 6.5, bundled with VC++EE, runs on NT). And even though the CD-ROMs include a patch for NT 3.51 to bring it up to snuff, I ran into numerous difficulties trying to get it to work. Microsoft recommended I upgrade to NT 4.0, which I did. That worked.

SQL editing and debugging are well integrated into the VC++EE environment. Open a new project and put a data source into your workspace, and a DataView tab appears in the left window. Open the DataView pane, and you have expanding outline-style access to the data source's stored procedures, tables, user-defined data types, and views.

For most database entities, the DataView pane provides read-only access; you can look at property-field types, table structures, and so forth, but you cannot modify them. You can, for example, dump a table or a table view -- in which case the output appears in the results window -- but you can't update data within the table. As of this writing, the DataView pane worked only with Oracle and Microsoft SQL Server data sources; the SQL debugging feature was usable only with SQL Server 6.5. Other data sources might be added in the future.

You can, however, insert stored procedures into a database and add triggers to a table. You can then execute the stored procedure through the debugger, set watches and breakpoints, and generally interact with the stored procedure much as you'd interact with a C++ program.

Other elements in VC++EE have been in the VC++ package for some time: the AppWizard, the ClassWizard, and the Component Gallery. VC++ 4.2 (the heart of the Enterprise Edition) adds support for remote data ob jects (RDOs) in the form of a remote data control in the component gallery, and visual data controls that can be bound to the remote data control. VC++ also extends Microsoft Foundation Classes (MFC) support of open database connectivity (ODBC), adding features such as multithreading within ODBC classes.

VSQL is actually an adjunct to VC++, providing tools and wizards missing from the VC++ platform. Indeed, to install VSQL you must first install a copy of VC++ (version 4.0 or higher). Ironically, Blue Sky recommends you use VC++EE.

Install VSQL, and you insert a slew of wizards and design-time components into your VC++ environment. Some of these wizards are application builders -- the Client/Server AppWizard, for example. Others assist you in assembling pieces of the application; for instance, the Datasheet Wizard helps you build a datasheet dialog box, which works well as the detail side of a master/detail application. Still other wizards are stand-alone tools, such as the SQL Q uery Builder, with which you can visually build a SQL statement by pointing and clicking on buttons. (Experienced users may find this simplistic, however.)

VSQL floats on a layer of MFC, which in turn floats atop ODBC. VSQL adds a set of classes to MFC that extend ODBC support. In this sense, VSQL is a VC++ equivalent to Visual Basic add-in products.

Wizards are so important to VSQL that it makes sense to describe some of them in more detail. Some explanations follow.

Client/Server AppWizard. A database-focused, pumped-up variation of the standard AppWizard, this is where you construct muscular database applications. For example, the C/S AppWizard can guide you through erecting a feature-rich master-detail database application.

Data Screen Wizard. This leads you through the design of a data screen, which is a window into a record fetched from a table or a view. Occasional side trips occur into the Query Builder, where you build the query that fetches the requi site record.

Datasheet Wizard. Similar in operation to the Data Screen Wizard, this helps you design datasheets, which are spreadsheet-style variants of data screens.

Other wizards include the Fill Datasheet Wizard, which you use to determine what data will go into a datasheet -- a query, a view, or a whole table. Should you select query, the Fill Datasheet Wizard sends you into a nest of builders and SQL wizards: Select Query Wizard, Insert Statement Wizard, Update Statement Wizard, the aforementioned SQL Query Builder, and more. There are so many wizards, editors, and builders assaulting you with assistance that it's easy to lose your way.

Finally, two welcome members of the VSQL tool set are the configuration tester and the ODBC data-source tester. The former allows you to verify that you set things up properly when you installed VSQL -- something I'm never sure of until it's too late. The latter verifies that an ODBC data source is correctly configured.

O ptima++ (see the review "A C++ Tool That Cures VB Envy," October 1996 BYTE) comes from a company that's the offspring of a series of mergers among Watcom, Powersoft, and Sybase. This ancestry is obvious in Optima++: A core C++ compiler, the DataWindow Builder, and Sybase SQL Anywhere all come bundled in the Optima++ Enterprise product.

Optima++ emphasizes the GUI side of the development process. Still, rather than attempt to hide the intricacies of the generated C++ code, Optima++ keeps the source in your face even as it's generated. While some developers might prefer the VSQL approach, Optima++ engineers boast that the developer always has a clear shot at the C++ code.

Optima++ uses the familiar form-based drag-and-drop construction of applications, along with the expected object-properties window, but it marches to its own drummer in the way it provides programmer assistance during application construction. Optima++ uses what Powersoft calls the "reference card," a sort of active help system tha t provides instant access to the source code prototype of an object's methods. (Not that Optima++ has no wizards -- it includes a Form Wizard that's similar to the VC++ AppWizard.)

The reference card uses drag-and-drop programming to associate an object with its actions. Drag an object from the form and drop it into a source code window, and a reference card appears. From within the card, select an object's method (click on the help button if you forget its precise function), and Optima++ pours the call to the method into your source code.

Optima++ Enterprise Edition also includes a legacy of Optima's PowerBuilder roots, the DataWindow. This is a kind of customizable database-access and management tool.

To the Enterprise

Which product should you buy? That depends not only on which side of the client/server line your development emphasis lies but also on what tools you currently use. If you already have a copy of VC++ and you're wrestling with server-side triggers and stored pr ocedures, upgrade to the Enterprise Edition. Consider also investing in Blue Sky's VSQL to help you quickly bang out database-access applications.

If you have no client/server development tools in-house, Powersoft's Optima++ Enterprise Edition sits atop a solid C++ compiler, comes with more accessories than you'll ever need, and -- if Powersoft and Watcom maintain their track records -- will only improve with time.


Product Information


Optima++ Enterprise Edition 1.5.................$1999

Powersoft
Concord, MA
Phone:    (800) 395-3525
Phone:    (508) 287-1500
E-mail:   
sales@powersoft.com

Internet: 
http://www.powersoft.com

Circle 1044 on Inquiry Card.

Visual C++ E
nterprise Edition 4.2...............$ 999

  (requires Windows 95 or NT)
Microsoft Corp.
Redmond, WA
Phone:    (800) 426-9400
Phone:    (206) 882-8080
Internet: 
http://www.microsoft.com/

Circle 1045 on Inquiry Card.

Visual SQL 4.01.................................$1499

  (requires Microsoft Visual C++)
Blue Sky Software Corp.
La Jolla, CA
Phone:    (619) 459-6365
Fax:      (619) 459-6366
E-mail:   
sales@blue-sky.com

Internet: 
http://www.blue-sky.com

Circle 1046 on Inquiry Card.

HotBYTEs
 - information on products covered or advertised in BYTE


Visual SQL


Ratings

Technology         ****
Implementation     ****


Key:

***** Outstanding
**** Very Good
*** Good
** Fair
* Poor


Advantages:

+ Lots of Wizards; very helpful for novices.


Disadvantages:

- Requires purchase of VC++EE.
- Abundance of wizards could be annoying for skilled programmers.



Optima++


Ratings

Technology         ****
Implementation     *****


Key:

***** Outstanding
**** Very Good
*** Good
** Fair
* Poor


Advantages:

+ C++ programmers have better control over generated code.
+ Lots of bundled packages.


Disadvantage:

- Not recommended for novice C++ programmers.




Visual C++


Ratings

Technology         ****
Implementation     ****


Key:

***** Outstanding
**** Very Good
*** Good
** Fair
* Poor


Advantages:

+ Integrated editing and debugging of stored procedures and triggers.
+ DataView pane provides quick viewing of database structures.


Disadvantage:

- SQL editing/debugging currently works only with SQL Server 6.5.



Features

               
Optima++
             
Visual C++
           
Visual SQL

               
Enterprise
           
Enterprise

               
Edition
              
Edition



Description    A C++ IDE with       Visual C++ with the  A collect
ion of
               unique automated     DataView pane and    wizards and compo-
               programming          SQL editing and      nents that enhance
               ("reference card")   debugging.           Visual C++ with
               and database-                             client/server data-
               connectivity                              base capabilities.
               features.

Wizards        Form Wizard jump-    AppWizard, Custom    More than you can
               starts a variety of  AppWizard, OLE Con-  count: Includes VSQL
               application styles;  trol Wizard,         AppWizard, Data Screen
               Query Editor auto-   ClassWizard.         Wizard, Datasheet 
               mates construction                        Wizard, SQL Wizards,
               of SQL queries.                           SQL Editor, SQL Query
                                                         Builder.

Other          Sybase SQL Anywhere, SQL Server 6.5,      Sybase
 SQL Anywhere,
products       Intersolve Data-     Visual SourceSafe,   Database Explorer,
bundled        Direct ODBC Drivers, InstallShield,       Graphics Locator.
               DataWindow Builder,  Crystal Reports.
               Installshield, 
               ObjectCycle, 
               InfoMaker.
 
We're glad     ...uses reference    ...allows debugging  ...includes such
it...          cards. They provide  of SQL in triggers   capable wizards. They
               just the right       and stored proced-   save typing miles of
               amount of help,      ures. This works     C++ code to generate
               keepng track of      seamlessly with de-  database applications.
               objects and methods  bugging of the       
               without causing you  primary application.
               to lose your grip
               on the code.

We wish it...  ..provided some way  ..would widen its    ..extended its data-
               to integrate the     SQL debugging and
    base support beyond
               DataWindow into      editing to more      ODBC.
               Optima++-generated   data sources.
               applications.



Visual SQL

screen_link (43 Kbytes)


Optima++

screen_link (49 Kbytes)


Visual C+ +

screen_link (55 Kbytes)


Rick Grehan is a senior technical editor for BYTE reviews. You can reach him by sending e-mail to rick_g@bix.com .

Up to the Reviews section contentsGo to previous article: Go to next article: Database Alphabet SoupSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network