[ ERCB Home |
New |
Feature |
Brief |
DDJ |
Letters |
Links
]
Power to the Programmer
Review by Tom Saltsman
Copyright (C) Dr. Dobb's Journal, June, 1996
Until last year, my PowerBuilder library consisted of magazine articles,
vendor-training material, dog-eared photocopies, and the only book available
-- Bill Hatfield's Developing PowerBuilder 3 Applications. As PowerBuilder
has grown in popularity, however, new books appear all the time. A title
search on PowerBuilder in the Computer Literacy Bookstore Web site
(http://www.clbooks.com)
will return nearly 40 books.
What's interesting about the books that come up on the title search, however,
is that a half dozen or so target PowerBuilder 5 which, at this writing,
still isn't shipping. With that in mind, I'll examine three books billed
as complete guides to PowerBuilder 4. Since book publishers commonly slap
minor revisions, updated version numbers, and new screen shots on existing
books just to get to the shelf first, my comments about these PowerBuilder
4 books will likely apply to their soon-to-be-released Version 5 editions.
(Indeed, one of the books examined here already has a Version 5 edition
announced.)
PowerBuilder 4: A Developer's Guide
David McClanahan's PowerBuilder 4: A Developer's Guide opens with
an overview of the PowerBuilder environment. He explains its object-oriented
features, where and how to get help, and presents an overview of the painters.
(A painter is PowerBuilder's development environment for creating specific
objectswindows, datawindows, and menus. Hence, there is a window painter,
a menu painter, and so on.) Next, McClanahan illustrates the Powerscript
language, followed by an application and library painters. He defines every
menu item and its usage. In doing so, he builds a simple .EXE, displaying
various response windows based upon your PB.INI files.
In the heart of the book, McClanahan probes into window objects. Window
events, functions, and attributes are delineated, and he gives an account
of all window painter and menu items. You create another application, this
time demonstrating the principle window types, except MDI. Next, window
controls are revealed, and for each control (Command button, SLE, DDLB,
and the like), he discusses attributes, events, and functions. This is followed
by embedded SQL, leading to the main portion of the book -- DataWindows.
The examples here are not hands on, only described. In the Extending PowerBuilder
chapter, examples of DDE clients and DDE servers, DLLs, integrating C++,
and OLE are presented, along with code. McClanahan finishes his book with
an elegant chapter on inheritance, along with separate examples for windows,
user objects, and menu inheritance. There is plenty of material for further
study here.
McClanahan is a widely read columnist, educator, and author of articles
about client/server technology. His book reads just like his articles--
concise, with no straying from the subject. McClanahan is at his best explaining
OOP concepts -- polymorphism, inheritance, and encapsulation, with concrete
code examples. The accompanying diskette with examples of user objects,
DDE, and OLE, is excellent. Another nice feature is the section explaining
how Windows processes the application message queue. In his preface to PowerBuilder
4: A Developers Guide, McClanahan states his intent to get you up to
speed on PowerBuilder as quickly as possible. One drawback I see, however,
is that it takes 350 pages to get to the DataWindows topic, the backbone
of PowerBuilder software. Another minor drawback is that every single attribute
and event for all controls is defined, duplicating the PowerBuilder manuals.
Developing PowerBuilder 4 Applications
A quick examination of Developing PowerBuilder 4 Applications, Third
Edition, lets you know that this is not Son of Developing PowerBuilder
3 Applications. Following an introduction to client/server computing,
Bill Hatfield plunges right into a PowerBuilder application -- a Customer
Address window. Working in the library, application, database, DataWindow,
and window painters, you complete the application, and create an .EXE within
the first 50 pages. In two hours, you have a firm grasp of the PowerBuilder
environment, which is particularly useful for those new to OOP.
Hatfield proceeds to probe deeper into window controls, menus, powerscript,
and debugging in the middle of this book. Section titles like Talking to
Your Parents and Joins and Other Cozy Subjects border on being corny, but
keep your interest. Others, such as Protecting Your Privates, suggest paying
closer attention. I was disappointed in not seeing a Problem Child Windows
chapter, a subject every PowerBuilder developer can relate to. Powertips,
Powergotchas, Powernotes, and Poweralerts are sidebar- type items interspersed
throughout, allowing you to gain additional knowledge. In the final third
of the book, Hatfield discusses user objects, graphs, and OOP. Inheritance,
polymorphism, and encapsulation are analyzed at arms length without specific
examples -- the one downside to the book.
Hatfield is the manager of education for a consulting firm and has been
teaching PowerBuilder for three years. His upbeat writing style makes learning
a fun and painless experience. This is clearly a book for beginners and
a worthy complement to his earlier work.
Special Edition: Using PowerBuilder 4
The cover states that this book is geared toward the accomplished to expert
level, but Special Edition is also adequate for a PowerBuilder novice
possessing experience in the Windows environment. The best feature of this
book is that you build an Inventory Tracking System, not a handful of unrelated
windows. You use DDLBs, checkboxes, DDDWs, radio buttons, LBs, command buttons,
and the like. This provides a comprehensive example of a half-dozen tables
and windows.
There are seven parts to the book, including an introduction to the system
with E-R diagrams, helpful for those not familiar with the relational model.
The Powerscript language is discussed, followed by an investigation of DataWindows.
In the fourth section, you put it all together, delivering the final software,
debugging it, and creating the .EXE. Next, the authors delve into dwModify,
inheritance, and the data pipeline, with separate chapters devoted to each
topic; then you are guided through a dwShare example. The last part is composed
of a function-reference section, organized by object, and an attribute and
event quick lookup. The appendix contains a section about Watcom C++ (which
comes with the PowerBuilder Enterprise Edition).
The accompanying CD-ROM contains over 100 MB of third-party tools and demos,
including scaled-down versions of InfoModeler, ObjectStart, GUI Guidelines,
PowerClass, PowerFrame, PowerTool, RoboHelp, and S-Designer -- plenty of
material for further study.
Conclusion
Each book emphasizes different parts of PowerBuilder and has its own strengths.
For an experienced windows developer, I'd recommend Special Edition
or A Developer's Guide. If you're visually oriented, or feel you
would absorb more by following one application throughout, Special Edition
is your best bet. If you thirst for a deeper understanding of DDE, OLE,
inheritance, or user objects, A Developer's Guide would be a better
choice. For the novice, Developing PowerBuilder 4 is your best option.
PowerBuilder 4: A Developer's Guide
David McClanahan
Henry Holt, 1995
873 pp., $44.95
ISBN 1-558-51417-1
Developing PowerBuilder 4 Applications, Third Edition
Bill Hatfield
SAMS Publishing, 1995
910 pp., $45.00
ISBN 0-672-30695-6
Special Edition: Using PowerBuilder 4
Charles Wood et al.
Que Inc., 1995
682 pp., $49.99
ISBN 0-7897-0059-X
Electronic Review of Computer Books
Created 5/1/96 / Last modified 6/9/96 / webmaster@ercb.com