Cross-Platform 4GL
Volume Number: 13
Issue Number: 10
Column Tag: Tools Of The Trade
PowerBuilder Version 5
by John Schettino
Cross-Platform Database 4GL
Big Time 4GL for Macintosh
The PowerBuilder product line from Powersoft (a division of Sybase, Inc.) is a
cross-platform database application builder. I've always called these things 4GLs
because they are database-centered environments that include a custom programming
language, application framework, and database back end.
PowerBuilder is the mother of all 4GLs, since it is available on every major hardware
and operating system platform and it can access data stored in a comprehensive set of
databases. If you're creating enterprise or vertical applications that have heavy
database requirements, or if you need to create font-ends to access data stored in
non-Macintosh database servers, PowerBuilder is the product for you. It's also the
product for you if you need to support non-Macintosh systems including Unix and
Windows with a single product.
At just under three thousand dollars for the Enterprise version, this is not an impulse
purchase. This product is aimed squarely at in-house IS departments, database
consultants, and vertical market developers.
Big Time System Requirements
The product is delivered in a typical large software box. What is surprising to me is
that this box was actually filled with manuals and a CD wallet containing four CDs.
Fortunately only one CD contains the product. The other three cross-platform
Mac/Windows CDs are filled with on-line documentation and reference material.
You can run PowerBuilder on 680x0 processor machines, but you'll get better
performance on a PowerPC processor computer. Memory requirements are also fairly
stiff. A minimum of 16MB on a PPC is suggested. I evaluated the product on a 7100/80
with a 256kb cache and 40MB of RAM and it ran comfortably fast. You'll also want to
have a fair amount of free disk space. I installed the "Easy Install" package onto a
volume other than the System volume and it ended up installing 13MB of extensions
into the System folder and 50MB of files onto the selected volume.
The Mother of all Learning Curves
PowerBuilder is complex. That's not a criticism, it's a warning. You will not sit down
with this product and start building applications. Instead, you'll have to start climbing
a long learning curve to become proficient. To that end, the documentation is split into
two pieces.
Printed Documentation
The printed documentation includes a 15 page installation guide that walks you through
the installation and tells you what gets installed where. Following that is a 235 page
getting started tutorial. You'll want to spend time here actually working through the
tutorial example. If you do, you will visit most of the commonly used tools in the
environment. You won't learn anything about the PowerScript language used to
program in PowerBuilder, but you will get to type some of it into the example at the
appropriate places. The tutorial is very nice: not only do you get a tour of the
environment, but the application is built in the steps that you would use when creating
your own. Each section begins with a three part overview: What you will do, How long
it will take, and What will you learn. This helps keep you focused to the task at hand.
The next document is called the Project Primer. This is a 214 page "how to" guide that
explains one method for tackling a problem. It provides a life-cycle approach to
application development. This kind of road map is vital when you're working on a large
problem, and this document came as a pleasant surprise to me. Even if you use some
other development method, you should scan this document to see where and when the
PowerBuilder tools are applied.
The largest document is the 580 page tome "Connecting to Your Database." It is a
reference guide explaining how to connect your application to each of the supported
database back-ends for PowerBuilder. This document can be completely skipped while
you learn the environment and tools. Only when it comes time to access one of those
databases would it become necessary.
Additional documents include the usual license agreements, customer service
references, and third-party directories. You can optionally order printed versions of
the electronic documentation as well.
Electronic Documentation
As you probably realized, there is really no user's guide or comprehensive reference
in the printed documentation; that is left to the CDs. Three are supplied; the Reference
CD is specific to the Macintosh product. Here you will find all the expected documents,
including the Guide to Documentation. The electronic documents viewer application, as
well as one or more of the books, can be installed onto you system for access without
the CD. You can also print your own hard copy version of selected chapters or entire
books. Searching is also supported by the viewer.
Two "InfoBase" CDs are provided. This is a subscription-based information delivery
system. You have instant access to every tip, problem and work around, and general
information in the PowerBuilder system. There seemed to be a lot of valuable
information there, and you can print or search as with the other electronic
documentation.
Let's Build Something!
By now you're probably as eager as I am to actually build something with
PowerBuilder. One of PowerBuilder's main strengths is in cross-platform
development. When you're working on an application you can use a wide range of
database back-ends, or you can use the supplied SQL Anywhere Database. I used that
database for the review. To put PowerBuilder through its paces I'll create a simple
database, a record entry and search screen, and a report. This will give you a feel for
most of the tools.
Where Do You Want To Go Today?
You begin by launching the PowerBuilder environment. It is immediately apparent that
this is clearly a Windows95 application running on a Mac. Once you get over the initial
shock, the environment works well. If you happen to be familiar with Windows95,
you'll find all your favorites here: endless rows of icons, status bars, tool tips that pop
up when you move the mouse over an icon, tabbed dialog boxes, and Windows95-style
collapsible hierarchies abound. On the plus side, using PowerBuilder on a Mac or a PC
should be pretty much the same.
Database Definition
Each major task has a corresponding tool (called a painter) in PowerBuilder. To work
with databases you use the Database Painter. Once you open a painter, you get another
row of icons for operations specific to that painter. You can create a new database or
work with existing databases from any of the back ends supporting by using the
painter. I was able to quickly define a pair of related tables using SQL Anywhere (a
self-contained relational database back end that ships with PowerBuilder) in the
painter. Figure 1 shows the tables and their relations.
Figure 1. Database Painter.
You begin by connecting to an existing database, or creating a new one. Then you create
or edit each table. The table editor allows you to add or modify fields. You create key
fields, indexes, and other attributes of a table by accessing it's Properties. This is
another one of those Windows95 conventions that appear throughout the product. Once
you're done, you save the table. This generates the correct SQL to create a table, and
sends it off to the back-end. Editing a table with data in it does cause you to lose that