PC Magazine -- January 9, 1996

Oracle Corp.: Oracle Power Objects

An ideal front-end development tool needs to be more than merely visual and data-aware: It must leverage GUI design techniques and apply intrinsic knowledge of the underlying database to help you perform common development tasks quickly and efficiently.

Oracle Power Objects aims to deliver just that. Targeted at workgroup application development, Power Objects uses two powerful techniques to streamline front-end development: a practical object-oriented approach that sidesteps the intricacies of traditional object-oriented programming and drag-and-drop visual application design. While these two fundamentals provide an excellent foundation on which to build a development tool, the initial release of Power Objects has a couple of rough edges.

Power Objects is currently available for Microsoft Windows 3.1 and Macintosh in two editions: a $395 Standalone Edition and a $1,995 Client/Server Edition. Both versions are functionally identical and differ only in their database connectivity. The Standalone Edition comes with Oracle's Blaze local database as well as support for Personal Oracle7. The Client/Server Edition adds support for Oracle7, Microsoft SQL Server and Sybase SQL Server. Oracle has announced plans for OS/2 and Windows 95 versions, but the 16-bit Windows version is the only current choice on the PC.

Dedicated to databases

Power Objects resembles Visual Basic in many ways. As in VB, development revolves around building forms, placing controls, and setting properties. Power Objects uses Oracle Basic--a Basic dialect that closely parallels VB--for writing methods. It also provides an integrated interface for working with database tables, indexes, and views for the connected server. But, while VB is a general-purpose tool with database capability, Power Objects focuses solely on database development.

One of the most striking features of Power Objects is the integration of drag-and-drop into all aspects of development. While its implementation in this first release is less than perfect, this approach greatly simplifies many tasks.

The Power Objects interface is straightforward and uncluttered. The Main window contains all the highest-level objects: applications, libraries, and database sessions (see Figure 4). Each of these three basic object types opens to show you its component objects. For example, a database session object typically contains tables, indexes, and views, while an application object contains forms, reports, and bitmapped graphic objects. You can drag-and-drop objects between applications and between database sessions, even those based on different databases.

First steps

The first step to developing a Power Objects application is building a database session. Power Objects uses a standard interface for all supported databases, though some server-specific features may not be available on all servers. The Blaze database included in the product is basically a subset of Personal Oracle7, the company's local version of Oracle7 Server. Blaze stores all of a database's objects in a single file with a .BLZ extension. While Blaze is a SQL database, it is primarily designed for single-user applications. It does not support some of the key aspects of Personal Oracle7, such as multiple-column primary keys and PL/SQL. If you're developing applications for deployment on Oracle Server, you'll definitely want to use Personal Oracle7, as its feature set is identical to the larger server product.

To make a new database session functional, you only need to fill in its connect-string properties. Once you've established a database session, you can create tables, indexes, views, and sequences directly through the Power Objects interface.

The Power Objects Form Designer is the heart of the product. As in VB, a floating Object Palette provides the objects you place on the form, and a property sheet lets you customize them. Forms and many of the form objects are valid destinations for drag-and-drop. You can, for instance, drag a database table icon to the form, which automatically places field objects for all the columns in the table.

All the objects that let you enter or select values are data-aware. To bind one to a column, you simply open the table definition in a separate window, grab the column, and drop it onto the object. Power Objects uses OCXs in its Object Palette and can use third-party controls, but it does not support VBXs. Since the product is still only 16-bit, it can handle only 16-bit OCXs. Fortunately, most control vendors are delivering their products in both 16-bit and 32-bit versions.

Unlike VB, Power Objects integrates all of an object's methods into its Property Sheet dialog. To keep things manageable, a toolbar in the Property Sheet lets you separate properties from methods, show and hide unused properties and methods, and lock onto a specific property while you switch focus between objects. Unfortunately, the implementation of this promising approach appeared rough-and-ready in this first release.

There is no separate code editor in Power Objects, so you have to write your Oracle Basic code directly in the Property Sheet window (see Figure 5). When you select a method, a small drop-down edit window appears. While this window grows vertically as you type, its width remains the same as the Property Sheet. Since the Property Sheet is always on top when you're designing a form, you find yourself constantly stretching it to enter method code, then squeezing the window back so you can get at your form. You also have to make do without basics like syntax checking and search or search-and-replace facilities. Oracle has promised to deliver a fully functional code editor in the next release of the product.

A separate User Properties window lets you extend the Properties Sheet using your own custom properties and methods (see Figure 6). You simply add these to the User Properties by entering the name, the type (property, function, or subroutine), the datatype, and a list of any arguments your function or subroutine may require. Adding your custom property or method here only puts it in the User Properties window; to make it usable you need to drag it down to the Properties Sheet. After that, you can use it as though it were a built-in property or method. By defining appropriate custom properties, you can reduce the number of variables in your application's code. Oddly, you can declare variables only as global to the entire application or local to a specific piece of method code; you cannot declare a variable as visible to all objects in a specific form.

Classes

Classes offer a more powerful way to extend the development system. A Power Objects class is merely a collection of objects created with the Form Designer. Classes can be dragged onto any form, letting you reuse visual and functional elements across multiple applications.

Since the class instance that actually appears on other forms is inherited from the original class, any changes you make to the original will be applied wherever you used that class. The one caveat is that if you change a property of an instance of a class, further changes to the same property of the original class will not affect it. A Reinherit button on the Property Sheet toolbar gets around this by letting you reset the currently selected property to the value in the original class. This visual implementation of inheritance provides a painless way to achieve reusability, one of the most powerful features of object-oriented programming.

Report designer

The Report Designer in Power Objects is a plain banded report writer. There are no wizards, mailing-label layouts, or mail-merge helpers. It is almost identical to the product's form designer, except for the header, group, detail, and footer bands. Objects placed in reports have properties and methods, which means you can make your reports respond to users interactively.

We were disappointed to discover that we couldn't simply drag-and-drop bitmapped objects from our bitmap library onto a report as with forms, and there were no special aggregate functions available from the toolbar. To filter data for a report, you should know SQL, since you'll probably base the report on a database view. There is no query object in Power Objects, but a visual View Designer smoothes the process a bit. Power Objects does offer a Query By Form feature, but it is somewhat rough. Instead of letting you type example values directly into a form's fields, it pops up a clone of your form to accept the criteria.

You can distribute Power Objects applications either as compiled p-code or as standalone executables. When you compile to p-code, a portable object file with a .PO extension is created that will run with either the PC or the Mac version of the included Power Objects runtime module. Standalone .EXE files include the runtime module and other resources and can easily wind up being 3MB in size.

Power Objects has many very attractive aspects and great potential, but the first release is not quite ready for prime time. Oracle plans a first-quarter release of the next version--a full 32-bit implementation for Windows 95--that looks well-poised to deliver on the current version's promise.


Oracle Power Objects. List price: $395, Standalone Edition; $1,995, Client/Server Edition. Oracle Corp., Redwood Shores, CA; 800-672-2531.