DBMS
 

 


PowerBuilder 5.0

By Robin Schumacher
DBMS, April 1997

Powersoft Continues To Improve Power Builder With Release 5.0.


Few people would argue that when Powersoft (a division of Sybase Inc.) released version 5.0 of its PowerBuilder flagship product, it was a huge release for the company, in terms of new features as well as reputation. As for new features, the question was, could 5.0 offset criticism that the tool contained less than adequate enterprise qualities such as pseudo-code execution, the fat client syndrome, and scalability problems? As far as reputation goes, Borland's Delphi toolset had burst on the scene and garnered strong support from developers who liked the Visual Basic-like development environment and native-code execution. Could PowerBuilder win back any would-be Delphi converts?

The answer to both questions seems to be a solid yes. Although some will dispute this observation, PowerBuilder still seems to dominate corporate desktops as the client/server tool of choice. Not content to rest on its current success, Powersoft continues to push its toolset into new areas such as Internet development. Let's take a jet tour through the latest offering of PowerBuilder from start to finish and see what new tricks the tool has up its sleeve. (For a late beta review of PowerBuilder 5.0, see David Linthicum's column in the July 1996 DBMS, page 28.)

First Things First

As of this writing, the most recent offering of PowerBuilder was 5.0.02, which is what I was able to review, along with the Internet Developer Toolkit as a companion product. PowerBuilder (PB) can be purchased at several levels, ranging from PB Desktop for small development projects to PB Enterprise, which enables connectivity to all of the major RDBMS powerhouses. I tested the products out on a Compaq Pentium 120 MHz workstation loaded with 64MB of RAM running Windows NT 4.0 workstation, as well as a 133MHz Pentium equipped with 32MB of RAM running Windows 95. Both machines exceed the minimum requirements set forth by Powersoft (16MB of RAM and a 486 chip) but many engineers claim that for serious development and software builds, a fast Pentium machine loaded with an abundance of RAM is a necessity. Although I tested the Windows version of the product, PowerBuilder 5 also comes in Macintosh and Unix flavors.

Taking nearly 100MB of disk space, the PowerBuilder product with nearly every optional feature selected was installed easily. I then installed the Internet Developer Toolkit (IDK), which consisted of a personal Web server (WebSite from O'Reilly & Associates Inc.; www.ora.com) and the components needed for building Web-enabled PowerBuilder applications. When all was said and done, the IDK took about 20MB of space, and WebSite around 2MB.

To open PowerBuilder, you are required to supply a PB library, or .pbl, which contains the objects that make up a particular application. When initially started, PowerBuilder opens a set of libraries (which ship with the product) that constitutes a very nice set of examples showcasing many features of the tool. Using the Sybase SQL Anywhere DBMS (which comes bundled in), a new developer can visually walk through many objects that demonstrate database connectivity, data manipulation, and new enhancements over the previous 4.0 version.

PowerBuilder's integrated development environment is organized quite well and is easy to navigate. Through a series of "painters," a developer can construct windows, DataWindows, and many other objects that make up an application. In addition, PB offers very strong database utilities for viewing, creating, and manipulating database objects, and for moving data between disparate databases via their pipeline painter.

For users upgrading from 4.0, the new version requires that any development libraries be converted over to 5.0. Although I have heard rumblings about problems in the 4-to-5 conversion process, I was able to convert many of my complex libraries without a hitch. To help in this process, PB offers an enhancement in version 5: a new library Rebuild procedure that ensures that objects are regenerated and rebuilt according to their inheritance line, instead of merely in the order each object exists with the .pbl.

Object Power

Although some critics claim that PowerBuilder is not a complete object-oriented language, the tool continues to demonstrate its OO abilities quite well. After a stint in the C++ world, I appreciate the ease with which I can visually build reusable objects in PB that make use of the OO concepts of inheritance, polymorphism, and encapsulation. Having a solid understanding of object methodology enables engineers to construct class libraries consisting of various object types that may be reused for numerous development efforts. Some corporations take another route and instead purchase ready-made object libraries from a number of third-party vendors. This approach can be pricey and may not always provide the functionality needed for a particular business, so if the talent is available, it might be a good idea to build your PB libraries from scratch. Taking this approach also helps a corporation to modularize PowerBuilder components that encapsulate business logic and therefore take advantage of business-rules- driven development.

The folks at Powersoft introduced a few new OO features into version 5 that are worth mentioning. The ability to perform full-function overloading has now been made available, as well as the ability to pass arguments to functions in a read-only manner (thus boosting performance over passing arguments by the standard reference or by value). Developers may now pass arguments to user-defined events that previously were not able to accept any passed input. Various built-in events also provide meaningful arguments (such as the row number in the clicked event for a DataWindow) that previously could only be obtained by calling certain PB functions.

Windows of Data

PowerBuilder shines over many of its competitors in the ease of obtaining and manipulating database information. The Powersoft DataWindow has legions of fans who utilize the technology every day for OLTP and OLAP. With version 5.0, PowerBuilder has introduced several new DataWindow styles into the product that are welcome additions. The Rich Text DataWindow lets developers build objects that let users work with RTF files and use advanced word-processing functionality. The OLE DataWindow enables a PowerBuilder application to access most OLE-compliant software such as Microsoft Word and Excel.

Another powerful addition to the product is the DataStore. DataStores are in essence hidden DataWindows that developers can use to access and manipulate data behind the scenes. DataWindows and DataStores offer many exceptional benefits, but one of the most touted is their superior response-time speed over the classic embedded SQL. I didn't see much speed difference in version 4 of PB between DataWindows and straight SQL, but in version 5, my personal benchmarks showed a definite speed benefit in using DataWindows and DataStores over embedded SQL.

One last item to mention with regard to database development concerns Universal database support. With DataBlades (Informix), Data Cartridges (Oracle), and the like looming on the horizon, will PowerBuilder be able to handle the upcoming nonstandard datatypes? That answer is definitely in the affirmative, as evidenced at DB/Expo last December when PowerBuilder was shown accessing an Informix DataBlade module via an Informix ActiveX control. The longer- term outlook is full support and manageability for all extended datatypes with Powersoft's standard native drivers (instead of using an ActiveX control).

Distributed PowerBuilder

Version 5 of PB now provides the ability for a PowerBuilder application to be partitioned onto a third-tier server, thus helping eliminate the sometimes fat, two-tier traditional client/server layout. With a distributed approach, developers can centralize business logic on a single server, which helps provide greater scalability to their PB applications. With new 5.0 objects (the Connection and Transport objects), a client PB application can request functions and other business logic from another PB program running on a separate machine that acts as an application code server.

Early on, the feedback from developers using the new distributed functions of PowerBuilder was less than glowing. Now, however, Powersoft has made significant improvements with patch releases that help make the product more solid in this area. The one thing PowerBuilder is still faulted on regarding distributed applications is that its approach makes no use of CORBA or DCOM, as other tool distributors are beginning to do.

Machine Code

Critics always pointed out that previous versions of PowerBuilder ran slower with its pseudo-, interpreted-code runtime environment than a compiled-code Delphi application. With version 5, Powersoft has closed the gap, giving developers the ability to create either native 32- or 16-bit machine-code executables and .dlls (for Intel platforms) or pseudo-code .exes and PowerBuilder Dynamic Libraries (PBDs). Machine-code executables are somewhat larger in size than their pseudo-code counterparts and take longer to perform an application software build, but they do produce a performance edge.

One thing that has come as a surprise to some PB developers who are making the move to machine-code executables is that PowerBuilder's database and DataWindow technology has always been compiled code. Ideal candidate applications for compiled-code .exes that will run faster than their pseudo-code brothers are those that contain extensive script and mathematical processing.

Serving the Web

With the latest slew of Web development tool offerings from Powersoft (including NetImpact Studio and Starbuck), developers may be wondering if Powersoft has abandoned PowerBuilder for other products in relation to Web development. This couldn't be further from the truth. Two strategies, provided through the companion Internet Developer Toolkit, are currently available for using PowerBuilder for Internet/Intranet applications: Plug-ins and Web.PB. (For more information about plug-ins, see "Plugging into the Web," by Marcia Gulesian, DBMS, December 1996, page 69.)

Powersoft has provided both Window and DataWindow browser plug-ins that can be used to run a PowerBuilder application in a Web browser. To perform this task, though, the PB runtime libraries must be installed on the browser client. For thin, browser-only clients, developers can use Web.PB to build data-driven applications that require no runtime libraries whatsoever.

I was able to use the combination of the personal Web server that comes with the IDK, Website, and the IDK itself to build a simple application that accessed an Oracle7 database and returned information to both a Netscape and a Microsoft browser. (See Figure 1.) The IDK comes with a development wizard that helps developers build HTML pages from existing PowerBuilder libraries containing the necessary business logic. An integral part of a Web.PB application is a distributed PowerBuilder executable that runs to handle incoming requests for Web activity. This PB program assists in logic processing requests as well as interaction with any back-end database server.

The IDK also ships with a complete Web.PB class library that developers can use to build their PB Web applications. The library consists of a large number of functions that can generate the necessary HTML for browser/user interaction. Although this type of approach can definitely produce results, developers still need to be acquainted with HTML to get the most out of the Web.PB class library. Personally, I would like to see upcoming releases take more of a visual, RAD approach to Web application construction.

And the List Goes On

I found version 5 of PowerBuilder to be a solid, well-designed RAD tool complete with the development options that today's software professional needs to build client/server applications. In this limited space, I could never cover all of the impressive features of a large development product such as PowerBuilder 5; it's simply too big. Although not completely flawless, the tool continues to get better and pack more punch with each new release.

Pricing for PowerBuilder varies with the level of development you need. I've seen list prices range from $295 for the Desktop version all the way up to $2,995 for the Enterprise behemoth.

With an impressive list of third-party support (such as LogicWorks Inc.'s ERwin, SQA Inc.'s SQA Suite testing tools, and Intersolv Inc.'s PVCS), enhanced object-oriented abilities, powerful database mechanisms, built-in version control functionality (ObjectCycle), ActiveX support, and more, PowerBuilder continues to be the recognized leader for enterprisewide, visual RAD development.


Robin Schumacher is a senior DBA and developer for Louisville Gas & Electric in Louisville, Kentucky. He is the coauthor of The PowerBuilder 5.0 Developer's Resource (Prentice Hall, 1996), coedits the Industrial Strength PowerBuilder newsletter, and is a principal of Advanced Computer Designs. He can be reached at robins@ka.net, or visit his home page at www.ka.net/robins.


Figure 1.


--By using Web.PB, developers can create HTML-based applications that have the ability to return data from an RDBMS server to standard Web browsers.
Subscribe to DBMS and Internet Systems -- It's free for qualified readers in the United States
April 1997 Table of Contents | Other Contents | Article Index | Search | Site Index | Home

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