Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Borland C++ Development Suite 5.0


June 1996: Borland C++ Development Suite 5.0

Looking for a C++ IDE that spans the full development life cycle? Borland is

hoping you are. In this major upgrade to its C++ environment, Borland has added

a new compiler and IDE, a run-time error finder called CodeGuard, a single-user

licensed copy of PVCS version manager, the InstallShield setup utility, and an

integrated Java development tool set. Additionally, hidden just below the

surface is the Rogue Wave C++ Standard Type Library implementation, an

integrated debugger with multiplatform targeting and support for the Microsoft

Foundation Classes (MFC) application framework.

A Powerful New OWL

One of the most important features of Borland's last IDE was the Object

Windows Library (OWL). This framework made Borland C++ a favorite in many

software camps. Some developers appreciated its speed, others its simplicity,

and everyone liked its innovative features. True to form, there are plenty of

features in the 5.0 release as well--in fact, there are so many that I couldn't

do them all justice in the space of this review. So I'll just cover those I

found to be either excellent or exciting.

Improvements to the Object Windows Library include Windows 95 support (for

developing 16-bit and 32-bit applications), encapsulation of the Mail API, the

WinG direct graphics extensions, and WinSock. Encapsulating the direct graphics

extensions may appear self-defeating from a performance perspective, but the

feature makes an occasionally difficult interface easier to deal with. In

addition, splitter windows and dockable toolbars have made it to both the IDE

and the applications that you can generate using the Object Windows Library.

One of the most important areas in application development is reuse, and

while C++ is efficient for addressing class-level reuse, OLE continues to grow

in importance for reusability at a higher level. Traditional OLE development is

tedious and difficult for many programmers, even when class libraries like MFC

are used. To the rescue comes Borland's Object Component Framework, a class

library that simplifies OLE programming. Because the Object Component Framework

is not part of the Object Windows Library, it can be used independently to

create OLE clients, servers, and automation servers with ease. The Object

Component Framework can be a simple, time-saving mechanism for performing

tedious OLE housekeeping chores (such as creating and controlling an OLE object

within C++) or for manipulating OLE messages in a traditional Windows message

handler.

Another feature of Borland C++ 5.0 is support for ActiveX and VBX controls

in both 16-bit and 32-bit targets. In fact, using the Object Windows Library

you can also build your own ActiveX controls. The IDE comes with three

world-class ActiveX controls from Visual Components, which I highly recommend

you install: Formula One (an ActiveX control grid compatible with Excel 5),

First Impression (a rich charting and business graphics control), and VT

Speller (a spell checker).

Made for Java Development

Java development tops my list of exciting trends in our industry. Borland

has not only included a version of the Java developer kit, it has also modified

its code editor to highlight Java syntax and integrated the editor with the

Java compiler, viewer, and debugger. To take it one step further, Borland

supports Java in its application generator expert, AppExpert. It doesn't

generate entire Java applications or applets, but if you've attempted Java

development using the tools that Sun provides, you found out quickly how much

we've come to rely on syntax-sensitive editors and tight integration between

development tools.

Despite the inclusion of the Java developer kit, though, there are some

rough edges. I had hoped to find a rudimentary dialog creation utility for Java

bundled into the IDE, but no such luck. The code generation is also sparse,

providing a simple "starting point" applet shell with event methods covering

mouseDown, paint, run, and a basic method to start and stop threads. Still,

it's a welcome start, with integrated compiling, editing and debugging.

Application Automation

Wizards are here to stay. These useful automations bring thousands of lines

of useful code to bear in mere seconds by letting us choose from a set of

useful application starting points. AppExpert (as the Borland wizard is known)

has been expanded in version 5.0 to support more application types and options

than ever. There are choices for generating applications with dockable

toolbars, recent file lists, e-mail support (for Windows 95 compatibility

requirements), long file names and automatic registration of OLE 2 features.

Applications that the AppExpert generates can be OLE containers, servers, or

automation servers.

After you've selected your application's look and feel, target platform, and

window dressing (toolbars, status bars, and so on), you move on to the

ClassExpert. The ClassExpert adds event handlers, instance variables, and code

to manipulate classes. This wizard consists of a three-pane window that

displays a list of classes used in the current project, a list of possible

events, and a code window that lets you manipulate the program without having

to leave the wizard.

The most straightforward use of the ClassExpert wizard is to trap an event

that one of your windows or controls might encounter. Drawing on a built-in

Object Windows Library-aware database, you choose from an event list containing

applicable command events and virtual functions for your particular Object

Windows Library-derived class. To add a handler, you just right-click the mouse

button and select Add Handler from the resulting pop-up menu.

ClassExpert can also simplify OLE 2 automation. To implement this feature,

you define a class (including private and public variables and methods), select

it from the class list, right-click your mouse to activate the pop-up menu, and

select Automate Class. From that point you simply select parameter and help

file information about each method from a dialog. When you're finished,

ClassExpert generates the Object Component Framework code required to automate

the class. I was impressed by the productivity boost that this gives when

creating OLE automation objects.

A New Face In Borland C++: MFC

Borland's Object Windows Library and Microsoft's MFC are object-oriented

class libraries that simplify the creation of large, complex Windows

applications. In a major coup for MFC, Borland has finally chosen to support

versions 3.2 and 4.0 of this framework in addition to its own. Borland provides

a patch to overcome some MFC features that would not ordinarily pass Borland's

C++ implementation. This patch could prove very valuable to teams that are

split on the issue of which IDE to use--as long as great care is used to avoid

Borland-specific language features.

On the down side, Borland doesn't include MFC. To use MFC as your class

library, you must install Microsoft Visual C++ (either version 3.2 or 4.0)

before Borland C++. A special setup program (or manual commands) on the CD-ROM

alters the MFC source. You must rebuild the precompiled headers and libraries.

The MFC source is modified, but the changes appear to be safely surrounded with

#ifdef conditionals. Still, besides making me extremely nervous, I found this a

little clumsy--as well as horribly inefficient. On a single computer, the

overhead of installing both Visual C++ (to get MFC) and Borland C++ is

considerable (in setup complexity, disk space and time), which makes me

question the value of this process.

I've come to expect rough edges from the beta software that we typically

review for this column. The version of the software that I'm covering for this

review is the third or fourth iteration, and the product has stabilized a great

deal since the early days. Dealing with MFC is usually a real show stopper, and

I find that in general, Borland has done a good job, at the code level, of

dealing with a nearly impossible task.

One problem with the new Borland environment involves its support for MFC

within its wizards. To use the Object Windows Library as your framework, you

use AppExpert to create a new application that is ready to run (but void of

function). However, if you use the TargetExpert to target another platform for

your application later on, you can specify MFC as your framework, but you can't

take advantage of the look-and-feel and feature options that MFC would normally

provide. This operation appears to have no effect. If you want to use MFC as

your framework, you can't use AppExpert, and no source code is generated. It

appears that the MFC support works with its own existing applications, but the

Borland IDE doesn't generate new MFC applications.

Keeping Up With the Joneses?

Despite the abundance of new features and improvements, I found Borland C++

5.0 to be somewhat behind the times. I've grown used to compilers that have

open desktops (Borland employs a bounded multiple document interface window),

drag-and-drop editing, integrated multiple code views (class browsers

integrated with code windows, for instance), on-the-fly compilation, and

automatic save features (a la Symantec). Where other products have

multiple-machine distributed builds, wizard bars (instead of dialogs), and

features that make C++ as easy as Visual Basic, the Borland IDE feels like a

compiler from two years ago.

Today, to help us stay competitive, we developers demand higher

productivity, fewer mistakes, and flashy features like automatic syntax error

detection, as-you-type incremental compilation, and intelligent browsers that

automatically compile. From the dialog-based Class Wizard (these options could

be provided with context menus and wizard bars) to the hard-to-read Class

Browser (too many lines), this development environment isn't up to par.

Compared with my most recent conquest, Visual C++ 4.0, I found myself working

twice as hard to go half as fast.

To make sure that my impression wasn't clouded by my comfort with MFC and my

need to rediscover the Object Windows Library, I spent a great deal of time

exploring and testing. I've decided it's not me--it's the effectiveness of the

tool.

There are other examples of areas where Borland C++ 5.0 could use

improvement, such as editing text. The text editor has a context-sensitive

popup menu that appears when you right-click your mouse. When you highlight a

block of code to move it (one of the most common operations on highlighted

text) and right-click, there are no options to cut, copy, or paste in the

resulting menu. I was also unable to drag the highlighted text to a new

position. Instead, I was forced to use the edit menu for simple text movement,

and that was disappointing.

Other rough edges showed up while experimenting with the OLE Component

Framework. One document described in detail the steps for constructing an OLE

automation object. I work with Windows NT 3.51, and I was very surprised when

the tool I needed to use to generate a unique OLE automation server ID

complained that it couldn't find a particular OLE 2 component. This particular

component was part of OLE in Windows 3.1. Given that the Borland development

environment is a 32-bit Windows NT application, I was shocked to see a critical

tool calling for 16-bit Windows components.

The Silver Lining

Despite these rough spots, all of which I hope will disappear as the product

moves out of beta testing, the sheer utility of the Borland C++ Development

Suite can't be overlooked. The fact that you can target DOS and 16-bit Windows

clients--an important capability lost in Microsoft's Visual C++ years ago--is a

real plus, especially to the large portion of corporate America that isn't

going to move to Windows 95 or Windows NT on the desktop any time this year.

Couple this with Borland's excellent integrated debugging tools (you set

breakpoints directly from the code editor panes by clicking in the margins) and

perhaps you can overlook the lack of cutting-edge usability features.

The debugging capability is full-featured. You can debug DOS (using

Borland's Turbo Debugger), 16-bit Windows applications, and 32-bit applications

(even multithreaded applications and DLLs) right from the IDE. Various views

let you watch the call stack, monitor active threads, and examine run-time data

(variables, classes, and the processor). Speed menus (context-sensitive popup

menus) let you alter the variables' contents on-the-fly.

The visual database tools can generate whole applications without any

coding. The tool combines features of the (Continued from page 25)

Borland Database Engine (which may be familiar to Paradox, dBase and Delphi

programmers) with a set of data-aware ActiveX controls. Interestingly, the

Borland Database Engine is implemented as an OLE automation object. During

development, it allows you to work with live data so you have a feel for how

the application will work in production.

Other features include up-to-the-minute C++ language enhancements such as:

name space support to simplify mixed class library development, C++ Standard

Template Library support via Rogue Wave's newly licensed implementation, new

keywords (bool, mutable, explicit...), and finally CodeGuard.

CodeGuard helps you detect memory errors and track their causes. Errors such

as references to freed memory, memory overruns, uninitialized stack variables,

and stack overwrites are detected. Even run time library resource errors like

bad parameters and resource leaks can be trapped. From my tests, this is the

closest thing I've seen to NuMega's BoundsChecker.

It's a Wrap

After working with this compiler in various states of functionality for the

past few months, I find myself looking forward to each new beta release. As

Borland C++ Development Suite 5.0 comes to market, I am once again faced with

expanding my tool shelf. For me, the time savings that the Object Component

Framework brings to creating nonvisual OLE automation objects is a huge

benefit. Long-time Object Windows Library fans will enjoy the most up-to-date

C++ language features. Internet surfers looking for an edge in Java development

should examine the benefits that the product brings to it. And finally, unless

you work with MFC day in and out, this development suite certainly offers a lot

of bang for the buck, ranging from the safety and productivity boost inherent

in using PVCS version control, to rapid database application development, to

InstallShield for professional installation of your applications.

Pros and Cons:

PROS:

  1. The Object Component Framework makes developing ActiveX controls and OLE

    automation objects fast and simple by automating the housekeeping tasks

    normally associated with OLE development.

  2. Borland C++ 5.0 supports the Standard Template Library. You can develop

    with templates that fully implement complex operations in a

    platform-independent fashion.

  3. The integrated Java development and test environment will accelerate Web

    development by organizing the components of the Java development kit into a

    better integrated tool set.

CONS:

  1. MFC support requires that Microsoft's Visual C++ environments are already

    installed. Also there are no code generation capabilities, and a patch that

    makes physical changes to the MFC library source is required.

  2. Determining when and where to use the TargetExpert vs. the AppExpert is

    confusing.

  3. The Java development environment isn't integrated with the class wizard or

    the resource editors.

COMPETITORS:

  • Symantec C++ 7.2

  • Microsoft Visual C++ 4.0

  • Watcom C++ 10.5

  • IBM VisualAge C++ 1.0

Company Information:

Borland International Inc.

100 Borland Way

Scotts Valley, Calif. 95066

Tel: (800) 233-2444

Fax: (408) 431-4122

Web: http://www.borland.com


Price: $499.95 for the Development Suite, $349.95 for Borland C++ 5.0

Software Requirements: Windows 95 or Windows NT 3.51

Hardware Requirements: 486 or higher, 66MHZ, 16MB RAM, 100MB hard disk

space for typical installation

Technical Support: Free support for installation and configuration,

other paid support services available.

Money-Back Policy: 90-day guarantee

Circle #510 on Reader Service Card


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.