CMP's TechWeb





Winmag.com

WinLab Reviews
Software
Visual Basic 5.0, Professional Edition
Visual Basic Looks Better and Better

-- by James E. Powell

From first launch of your Visual Basic app to final compilation, one thing is clear: Visual Basic (VB) 5.0 is something very special. In many ways, this professional development tool rivals those found in a C++ environment.

The package opens with the new Gallery, similar to Microsoft Office's opening dialog boxes. It lets you choose to build a new application from existing templates or from scratch. The Gallery's Application Wizard, the new feature most likely to cut development time, prompts you to specify which elements to include in your new app-from a splash screen and About window to data entry forms for flat-files. The Application Wizard creates single or multiple document interfaces or an app that resembles Microsoft Explorer. In our tests, it had no trouble building a simple app that included three data entry forms for tables in Access 97's Northwind Traders sample database. VB's Application Wizard created the forms and skeleton code, including a toolbar and a menu for navigating to each data entry form, in just 27 seconds on an AST Pentium 166.

When you add a form to an existing project, VB offers another gallery of standard forms (dialog boxes, Tip of the Day and browser forms), plus a heavy-duty wizard to tackle a time-consuming chore-building a master/detail database form.

At long last, VB programmers get a native code compiler based on VC++ compiler/linker technology. However, the compiler does not first turn VB code into C++. C programmers may be used to more extensive alternatives, but the compiler's optimization options do let you choose between small and fast code, take advantage of a Pentium Pro chip, and remove array bounds checking or floating point error checks. The sample database app we created took just 32 seconds to compile. You can choose to create a symbolic debugging file, then debug your program within the Visual C++ environment (so you can trace through calls between your VB and C++ executables)

The compiler can be run from the command line. The program maintains the ability to generate p-code (pseudo code, used by previous VB releases) when size is more important than speed. P-code files are about 30 percent smaller.

Microsoft has paid careful attention to the speed of VB forms. In previous versions, forms containing two dozen or more controls (such as a data entry screen full of text boxes) seemed to take forever. Each control would often seem to appear individually. Borland's Delphi surpassed VB for speedier performance of the app (granted, having a compiler in Delphi also helped). The trouble was that when you distributed a VB app, it just did not have the zip of commercial applications. VB apps, though extremely powerful, were ponderous performers.

No more. Microsoft says forms can appear more than 17 times faster, depending on what's contained, and that most controls, such as the tab control, are also faster in this release. Even working with our beta version, which may not have been fully optimized, we can confirm that splash screens, for example, really do make a splash now.

As you'd expect, this latest version pays homage to the Web. Besides creating controls that can be placed on a Web page, you can create an Active Document executable. In a nutshell, an Active Document program is one that seamlessly runs within Internet Explorer. If you don't violate the rules of Web interface design, you need not worry about writing extra code-just run the ActiveX Document Migration Wizard and choose which parts of your app you want to run on the Web. Even exceptions are handled gracefully. Now included is a Web browser OCX for Web-enabling your program.

VB has grown and added more intricate features. Books Online, its new, comprehensive help system, organizes topics in hierarchical form similar to Microsoft's Developer Network, a subscription CD service. Books Online, friendlier in tone than the previously dry online help, gives real-world examples and explanations that bring complex concepts to life.

There's much more in the package. The interface is identical to that of the Control Creation Edition we previously reviewed (see What's Hot, March). It lets you keep multiple projects open simultaneously, automatically displays methods and properties in the code window when you press the "dot" after an object and offers a debugger that lets you hover over a variable to see its value. You can view properties alphabetically or by category, while the enhanced Object Browser offers easy access to project modules and procedures. In Debug mode, VB5 offers visual clues for breakpoints, current line of execution, bookmarks and CallStack markers. The Immediate window has also been updated; now you can run code at design time and in Break mode. Tools for manipulating objects on a form (alignment, vertical and horizontal spacing, and consistent sizing) are a welcome improvement.

Thankfully, the VB environment can occupy the entire screen, not take up bits and pieces as it has in earlier versions. Now that the Desktop doesn't show through, the IDE is far less distracting.

Besides the standard executable files, you can create ActiveX executables, DLLs and controls. The Setup Wizard has been enhanced to support distribution over the Internet, but it's still a weak point. You'll do better with a more powerful installation creator, such as the Wise Installation System from Great Lakes Business Solutions. Also new is the ability to raise and handle events in other apps (such as a PercentComplete event) using the WithEvents variable. Component writers can now include enumerated values in an ActiveX component's type library, making them available to developers using the component.

The program also comes in an Enterprise edition best suited to client/server development. It allows you to encapsulate business rules into a class, with properties, events and methods, and lets you set the threads per object (for instance, one thread per object for printing) and decide whether to use a thread pool. Such options are useful for, among other things, DLLs that run on a transaction server.

The Enterprise Edition costs $1,199, which also gets you bundled copies of Microsoft SQL Server 6.5 Developer Edition, Microsoft Transaction Server 1.0, Transact SQL Debugger, Microsoft Visual Database Tools and Microsoft Visual SourceSafe 5.0. Microsoft has put enhanced distributed component facilities into the package, as well as data-access features that include Remote Data Objects 2.0, Data Access Objects 3.5, User Connection Designer and Application Performance Explorer.

VB's compiler feature and new wizards bring it the ease of use and rapid development support provided for over a year by Borland's Delphi 2.0. (Delphi's newest version is just around the corner.) Gone from this version is 16-bit application development-VB targets 32-bit code only.

Given VB's focus on leading-edge technologies, that's no surprise, but it's a shame-16-bit application developers don't get to take advantage of the upgraded interface, speedy compiler and performance enhancements that put this software on our WinList of recommended products.

Q UICK V IEW
Visual Basic 5.0, Professional Edition
Pros : Compiler; performance improvements
Cons : Cannot use to create 16-bit applications
Strongest rival : Delphi 2.0
Microsoft Corp.
800-426-9400, 206-882-8080
Circle #682 or visit Winfo Online


Windows Magazine , May 1997, page 158.


CMPnet