Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesWindows-Built for Unix Power


March 1996 / Reviews / Windows-Built for Unix Power

PowerBuilder, the leading client/server programming environment for Windows, moves to Unix so your apps can, too

Tom Yager

PowerBuilder, the database front-end programming system from Sybase's PowerSoft division, has earned a place as a leading choice among corporate developers. Running under Windows, and more recently the Macintosh, PowerBuilder simplifies the task of creating robust applications that browse, update, administer, and report on data in remote databases.

Now PowerSoft has given PowerBuilder a Unix personality. The latest major release, called PowerBuilder for Unix, runs on Sun (and cloned) Sparc workstations under Solaris 2.4 and OSF/Motif. It's a full port of PowerBuilder 4.0 and does virtually everything its small-iron counterparts will d o.

Perhaps the greatest appeal of PowerBuilder for Unix is that it runs (as the documentation says) "mostly unmodified" applications developed with PowerBuilder for Windows or Macintosh. It's a graphical database client tool that maintains source-level compatibility across those three platforms.

Starting Out, We Hit a Bump

We tested PowerBuilder on a Sun SparcStation 10 with 64 MB of RAM. PowerBuilder does not include its own database server, but it does support Oracle 7, both Sybase and Microsoft SQL Servers, and Sybase System 10. We used System 10.

PowerBuilder for Unix is a native Sparc/Solaris application, but its Windows roots are obvious. PowerSoft deserves credit for not following the trend of forsaking printed documentation in favor of hypertext, but the bulk of this package's manuals depicts the Windows version of PowerBuilder. Only a few thin guides, an installation guide among them, speak specifically to the Unix release.

The first p roblem we encountered was getting the server configured. Sybase System 10 is virtually self-installing, but the PowerBuilder documentation fails to state clearly that you need a piece of optional software--Sybase's Open Client/Open Server. This is a set of libraries and header files that allows C and FORTRAN programmers to build Sybase database access into their applications. PowerSoft should have bundled the libraries with its products. We wasted considerable time trying to identify the missing piece. And while Sybase System 10 automates most of its initialization process, PowerBuilder's start-up requires considerably more manual labor; you have to hack user profiles and set environment variables.

Once PowerBuilder is installed, your first task is to connect to a database server. We ran the server on the same machine as PowerBuilder--still a fair test because PowerBuilder uses TCP/IP to communicate with the server even if the server is on the same box.

Each application gets its own database pro file. While you cannot create databases in PowerBuilder, you can perform most other functions (including defining new tables) from within it.

PowerSoft provides an excellent Unix-specific tutorial that walks you through creating an application from scratch. As you begin to work with the tutorial, you will gain appreciation for the role Bristol Technology's Wind/U plays (see the sidebar "Wind/U Opens Windows to Unix" ). Even fairly advanced interface elements, like floating toolbars, have successfully made the transition from Windows to Unix. To its credit, Bristol didn't try to recreate Windows under Unix; every basic interface element is native OSF/Motif. But Windows users will still feel at home because both layout and feel, right down to tabbed controls and common dialog boxes like File Open, are decidedly Windows-like. Such fidelity to Windows makes it easier for Windows PowerBuilder developers to target and test their applications for Unix.

Paint Your Application

PowerBuilder's environment consists of a set of painters . With the application painter, you pull together the application's elements and preferences. With the database painter, you manage table layouts, validation rules, and other related elements. With the DataWindow painter ( see the screen ), you design the user interface. There are also painters for menus, reports, and all the other elements that form a PowerBuilder application.

PowerBuilder maintains a hidden table called a repository that holds data-entry validation rules and initial values, among other things. By making these and other elements part of a database and not part of the application, PowerBuilder lets you reuse rules and other elements across tables. PowerBuilder makes objects of the application elements you create. You can transfer these objects from one application to another and create objects that inherit elements from other objects.

Anyone who thinks PowerBuilder is too expensive need only spend a few minutes with it. The software is loaded with the kind of grace notes and thoughtful turns that most software designers leave out. The validation-rules dialog box, for example, has a button that inserts the current column's variable name into the rule you're writing. The display-format dialog box not only lets you define a format for a column, it even tests your format within the dialog box itself. You just enter a value and click a button to see it displayed as you requested. We expected to have to pull up a database view to see if our format definition worked.

Windows-Centric Not a Bad Thing

Motif purists might chafe a little at the extent to which Microsoft Windows paradigms are applied to PowerBuilder for Unix. The Windows version of PowerBuilder is notable for, among other things, allowing developers access to low-level elements like the attributes for window styles. But when you pull up the dialog box for altering a custom window's style, you'll see a set of checkboxes detailing Windows-type attributes, not Motif-type attributes. Users running your application won't be able to tell because the look is still native Motif.

This Windows-centric approach is entirely appropriate. By choosing Windows as its base, PowerSoft made it possible to create gorgeous Motif database apps that port effortlessly to Windows, and vice versa. Were you restricted to Motif's capabilities, the Windows version of the ported application would suffer. For that matter, so would the Motif version.

If you're expecting PowerBuilder to shield you from having to learn SQL, you'll be disappointed. It doesn't reduce everything to drag-and-drop. If you're familiar with Windows tools, you might find PowerBuilder's approach similar to Visual Basic's. The interface helps you manage data elements, paint the interface, and perform basic procedures like field validation. But for virtually everything else, you'll need a strong foundation in both SQL and PowerBuilder's scripting language, PowerScript, a structured language that reads somewhat like BASIC. As with other operations in PowerBuilder, you're never flying blind when you're writing scripts. The package provides a debugger, and within the editor are powerful browsers. Database structures, interface objects, and other application elements are a few clicks away.

Delivery Time

Perhaps the best thing about PowerBuilder is what you get when you're finished building: a stand-alone executable program. PC snobs will bristle at being forced to keep the .EXE extension PowerBuilder requires, but that doesn't diminish the joyful simplicity of entering a single command to launch your program.

Virtually everything you create in PowerBuilder for Unix will move, unchanged, to PowerBuilder running in a Windows or Macintosh environment. Load your application into PowerBuilder for Windows and select the Generate EXE option to produce a native Windows program that acts just like its Motif counterpart. But if yo u tie C code into your program or call out to external Unix commands, you'll have more trouble porting: The executable files PowerBuilder creates are not directly portable.

It's disappointing that PowerSoft didn't also target Solaris x86. SunSoft touts source-level compatibility between its Sparc and x86 releases. If that's true, then PowerSoft could have targeted Solaris x86 with naught but a recompile. But things are rarely simple; at the very least it would have meant support and documentation requirements. PowerSoft does plan to target HP/UX and AIX but won't say when.

If you're delivering a critical client/server database application, you'd do well to consider PowerBuilder. We can't think of another tool that blends seamless cross-platform compatibility, high-level conveniences, and low-level access.


PRODUCT INFORMATION

PowerBuilder for Unix 1.0..............$3295
PowerSoft Corp.
Concord, MA
Phone:    (508) 287-150
0
Internet: 
http://www.powersoft.com

Circle 1105 on Inquiry Card.

HotBYTEs
 - information on products covered or advertised in BYTE


DataWindow Central Feature Across Platforms

screen_link (41 Kbytes)

A central feature of PowerBuilder, regardless of platform, is the DataWindow, which abstracts server-based SQL functions to make them available on client machines.


Tom Yager is a writer and former BYTE editor who operates a research lab in Texas. You can reach him at tyager@maxx.net .

Up to the Reviews section contentsGo to previous article: Go to next article: Wind/U Opens Windows to UnixSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network