Skip to main content.

Web Based Programming Tutorials

Homepage | Forum - Join the forum to discuss anything related to programming! | Programming Resources

Oracle Unleashed

Oracle Unleashed oun36fi.htm

Previous Page TOC Next Page Home


36

Introduction to Oracle Power Objects

This chapter introduces a new and exciting product, Oracle Power Objects (OPO), from Oracle Corporation. A general overview of Oracle Power Objects is presented, followed by a more detailed presentation of OPO key features. The Oracle Object Marketplace is introduced. Also, the relationship between OPO and Oracle Developer/2000 is discussed. Whenever possible, references will be made to the original sample applications that are shipped with OPO version 1.0. This is so a reader will have ready access to any code references.

Overview of Oracle Power Objects

Oracle Power Objects (OPO) is a visual, object-oriented, client/server database application development tool like no other in its class. Application developers are now able to rapidly design, prototype, develop, and deliver powerful, high quality, robust, client/server applications. These applications require less overall cycle time with significantly less code than with other widely used products such as Microsoft's Visual Basic.

Oracle Corporation has designed Oracle Power Objects from the ground up to be an object-oriented, data-centric, client/server, database application development tool. OPO is not a general purpose application development tool, unlike Microsoft Visual Basic. Oracle kept the developer in mind when choosing the programming language for Power Objects—Oracle Basic. Oracle Basic is extremely similar to Visual Basic, with the additions of object extensions and Structured Query Language (SQL) extensions. BASIC is the most commonly-used programming language. Any developer familiar with any version of BASIC will be able to quickly and easily transition to writing Oracle Basic code in Power Objects.

Oracle Power Objects has multi-platform support and supports the leading database engines. OPO is available in Windows and Macintosh versions, and will soon be available for OS/2 Warp. OPO has native drivers for Oracle7 databases and for Microsoft SQL Server and Sybase. Oracle7 support extends from Personal Oracle7 all the way up through Trusted Oracle7 on massively parallel processors.

Power Objects is object-oriented. There are no class libraries to learn. There are no complex rules for developing new classes of objects or for using these new object classes. Oracle Power Objects allows a developer to visually develop a new object class by using existing objects to build the new object class. Often, little to no code is required to build a new object class. Once the class is built, it can be used in as many applications as you choose, and the rules of object-oriented programming are enforced as you would hope and should expect. OPO supports multi-level inheritance, encapsulation, and polymorphism. To assist in the development of new object classes, OPO also supports the addition of user-defined properties and methods. The developer can write new methods for processing data from the database. Yet again, Oracle has considered the developer by supplying a large number of properties and methods with each type of object. These properties and methods have been designed to maximize efficiency in developing object-oriented, data-centric, client/server database applications. The three link properties discussed next illustrate the simplicity behind the functionality of OPO's data-centric objects.

Power Objects has built-in features at the object level to manage simple and complex relational database functionality. OPO does not require any coding to achieve this. Developers can easily create master-detail relationships by setting three link properties on the property sheet for the detail object. Providing the name of the column from the database table, view or synonym for the LinkDetailColumn and LinkMasterColumn values will set the equality condition (equi-join) defining the master-detail relationship. While providing the name of the object (the object is not required to be a form and often is not)representing the master concept for the LinkMasterForm value will finish all of the required steps for establishing a master-detail relationship. A good developer might spend two to four hours programming and debugging this type of relationship with other products where Power Objects permits the same developer to accomplish this goal within a few seconds.

To promote data integrity at the application level, Oracle Power Objects has included built-in referential integrity for master-detail relationships. OPO has three levels of built-in referential integrity control including: Refuse if Children Present, Update/Delete Cascade, and Orphan Details. Refuse if Children Present is the highest level of integrity enforcement stipulating that a user can not modify any of the primary key values associated with the master-detail relationship; and, also stipulating that a user can not delete a record from the master database table, view, or synonym reference if there exists any associated or related detail records. Update/Delete Cascade is the second, or most often enforced level of referential integrity that developers can use. It stipulates that a user can modify primary key values and/or delete master records if detail records exist. If the primary key values are changed, then the associated foreign key values in the detail records will be immediately updated. Orphan Details is often consider a nightmare for database administrators (DBAs) with respect to referential integrity because this forces the links between the master record and the detail records to be lost. There are many times when this is a desired and valuable result of referential integrity support, but in general this will complicate the support and maintenance of your database.

Key Features

Oracle Power Objects has numerous features that set it apart from other products including its diverse database connectivity, its integrated database session manager, and its integrated development environment. For cross-platform development and deployment, OPO application source code files and compiled p-code application files are binary-portable across all supported hardware/software configurations. (P-code is code that is in a halfway state between original source code and final compiled code.)

Hardware and Software Requirements

OPO is designed to run in three different major hardware/software configurations. These include: Microsoft Windows 3.1 or Microsoft Windows for Workgroups 3.11 running on a 386 or higher (486 recommended) IBM/Compaq compatible PC; Macintosh System 7.0 or 7.5 running on a 68020 or higher; and IBM OS/2 Version 3.0 running on a 386 or higher (486 recommended) IBM/Compaq compatible PC. Figure 36.1 illustrates the various platforms that OPO runs on and the various databases that OPO connect to.


Figure 36.1. Cross-platform and cross-database connectivity.

Database Connectivity

OPO provides database connectivity to the leading relational database environments. Naturally, OPO can connect to Oracle products. These include Personal Oracle7, Oracle7 Workgroup Server, and up through the massively parallel Oracle7 servers. Any Oracle 7.1 database server, local or remote, is supported. OPO provides support for Microsoft SQL Server 4.2 and Sybase SQL Server 9 through its implementation of dblib. OPO also provides a local database engine known as Blaze. Blaze is a SQL-92 compliant, single-user, single session, relational database engine. Blaze supports computed fields, inner joins, and join expressions. Blaze provides support for long raw or BLOB (binary large objects) objects for multimedia applications and for bitmap graphic manipulation. Blaze is fully upward compatible with Oracle7. Blaze was designed for standalone and disconnected-client prototyping and application development and deployment.

Integrated Database Session Manager

The integrated database session manager found in OPO provides the greatest distinction between OPO and other similar products, such as Microsoft Visual Basic and Borland Delphi. The session manager allows a developer to create, modify, restructure, view, and edit tables directly while respecting the constraints and limitations placed on these database objects by the database back end. The session manager can create, modify and delete table indexes, views, sequences, and synonyms. An index is used to improve the performance of the database by providing quicker access to the table information. A view is a combination of one or more tables with columns from each table represented in the view. Views are not editable unless they contain only one table. The session manager has a built-in view designer that is very graphical and powerful. Views can be designed by dragging and dropping relationships and columns. Conditions can be placed on the view. Also, labels can be specified for the columns in the view. A sequence is a special table construct provided whereby a number can be generated and guaranteed to be unique. A synonym is a reference to a database object by a different name. All the database privileges and constraints placed on the original database object still apply to the synonym object.

Figure 36.2 shows the sample MLDATA session in the Main folder window, with the MLDATA session database objects displayed in the MLDATA window. The MLDATA session has been connected to the Blaze database indicated in the DesignConnect property. Database tables, sequences, and views are shown in the MLDATA window.


Figure 36.2. Session Manager.

The session manager maintains all connection and session-related information including the ConnectType property illustrated in Figure 36.2. The ConnectType specifies when OPO attempts to establish the database session connection. Connect On Startup indicates that OPO should establish the connection when the application referencing the session is started. Data migration and upsizing can be accomplished through the drag-and-drop interface of the session manager. The session manager also provides built-in transaction processing logic and referential integrity checking. Without programming, a developer is protected from losing data without specifying that such data should be committed (saved) or rolled back (deleted). The developer has complete access to session manager operations from the object code level if they desire to override or augment some of these built-in functions.

Integrated Development Environment

The OPO integrated development environment includes a graphical application manager for displaying all application component objects. Component objects include applications, libraries, and sessions. Applications contains forms, reports, classes, OLE objects, and bitmap resources. Libraries contain reusable classes and bitmap resource objects. Sessions contain information relating to the database connection. Each of these application objects and its contained object components is represented visually in the OPO development environment.

OPO provides full support, under Microsoft Windows, for Dynamic Link Libraries (DLLs), OCX, and OLE 2.0. OpenDoc support for OS/2 and Macintosh is under development. Within the integrated development environment, a developer can create reusable objects called classes. The developer has a graphical forms designer to use in developing either these class objects or forms. Forms are the screen interface that a user will interact with. For each form and subsequently embedded object, a property sheet exists. The property sheet allows the developer to customize an object without requiring coding, simply point and click in many instances. The form designer has tool bar icons for object alignment and z-ordering (visibility layer). Standard objects on the tool palette include static text, field, button, radio button, checkbox, combo, pop-up, list box, radio frame, line, rectangle, oval, vertical and horizontal scrollbars, current row pointer, group object, OLE object, chart, bitmap, embedded form, and repeater. Many of these objects are data aware, where several can act as containers. A container has the ability to have other objects instanced within it so they are completely within the boundaries of the containing object. The tool palette can be extended through 16-bit OCX controls. When these are registered with OPO they will show up on the tool palette. Figure 36.3 shows the form designer displaying the form, frmRegister, from the sample finance application.


Figure 36.3. Form Designer.

An integrated graphical banded report designer is provided for developing simplified reports. These reports can include multi-level sorting and custom-group specifications. The report designer includes on-screen preview and print-to-printer capabilities. Figure 36.4 displays the report designer with the report, rptAmortize, from the sample finance application. The form designer and report designer are very similar in structure and function. Once a developer has been exposed to either designer, the other designer will seem much easier to use and understand.


Figure 36.4. Report Designer.

Developers will appreciate the integrated Oracle Basic runtime debugger. The debugger can be called from within Basic script, on startup of the application, or can be manually activated. The debugger provides a graphical object hierarchy diagram for selection of and navigation through the object, property, and method lists. A developer can set conditional breakpoints and watch variables. A developer can also step-through, step-into, and step-over code execution. Expressions and variables can be modified and evaluated from within the debugger. Figure 36.5 displays the sample finance application running with the debugger focused on the form, frmAmortize, inspecting the Oracle Basic code in the Click() method of the button, btnAmortize. The developer has set a breakpoint on the EXEC SQL statement.


Figure 36.5. Runtime Debugger.

The development environment also includes an integrated Query-by-Form capability for use during runtime. Users can specify and apply limiting conditions to the information being displayed on a form without any programming. Lastly, the development environment includes the ability to create standalone executable images including database connectivity without runtime fees. All the features mentioned, coupled with detailed online help documentation and extensive sample applications, and the overall Power Objects environment, form a well-rounded client/server database application development product.

What Is Oracle's Object Marketplace?

Oracle's Object Marketplace is a shopping center for Power Objects application components. The Object Marketplace is part of the innovative Oracle Internet sales initiative, the Oracle Store, available on the World Wide Web at www.oracle.com. The Marketplace is an online store for selling and purchasing Power Objects components and applications. These components can be OCX objects or OPO objects and applications. Developers will receive royalty payments for sales of their components by Oracle on the Internet. More than 250,000 copies of Power Objects have been sold, and more than 2,000,000 visits have been made to the Oracle home page. The Object Marketplace is an exciting addition to Oracle's marketing strategy for products and services.

Goals of the Object Marketplace include providing easy access to OPO components which enhance developer productivity, providing objects that encapsulate business logic commonly in use today, and providing a common forum for the exchange of these objects. Objects will be classified by concepts such as functional area, industry affected, hardware/software requirements, platforms supported, and so on. Not all objects will run on all supported OPO platforms.

The user interface to the Object Marketplace is accessible through almost any commonly available web browser. The CompuServe NetLauncher is just one such alternative web browser environment. We, the authors, were able to download the product, install the product, and connect to Oracle's home page within a total of 30 minutes (on a 486 DX4/75 24MB RAM PC running Windows for Workgroups 3.11). Other web browser products are probably just as easy to install and use.

Objects in the Marketplace will have a wide range of pricing. The prices are set by the developer of the object and approved by Oracle. Typical prices will be in the range $25-$200 per object. Support for the objects will be provided by the developer who created the object. Some support will be available through the Oracle Object Marketplace, or through Oracle's CompuServe forum.

Each object in the Marketplace has documentation provided online with the purchased object package. The objects must be developed in compliance with Oracle's coding guidelines and standards. One important guideline is the inclusion of in-line coding comments explaining the code used to support the object. Demonstration code or an example application for each object is another required piece of the object's promotional package.

Buyers can download demo versions of objects for trying without buying. Buyers also have the option of ordering over the phone or downloading the object from the Marketplace. VISA and MasterCard charges will be accepted by phone or via electronic cash for purchasing the objects.

Oracle Power Objects and Oracle Developer/2000

Deciding which product to use is a challenging task when one or more products can give acceptable results. While at first glance, it might appear that Oracle Power Objects and Oracle Developer/2000 seem to be competing in the same application development space, this is not the case. Table 36.1 illustrates the positioning of various client/server tools.

Product


End User


Power User


Workgroup


Department


Enterprise


 


 


 


(< 25 users)


(>= 50 users)


(< 50 users)


Microsoft Access

High*

High

Microsoft Visual Basic

High

Low

Oracle Power Objects

High

High

Borland Delphi

High

Medium

Sybase PowerBuilder

High

High

Low

Gupta SQLWindows

High

Low

Oracle Developer/2000

High

High

* Low meets minimum user requirements; Medium meets average user requirements; and High meets or exceeds user requirements.

As shown above, Oracle Developer/2000 is designed for department and enterprise-wide application development. While Developer/2000 can be used for the lower-end development areas. It's often considered to be over-kill with a steep learning curve with the need for a high-end deployment environment. Oracle Power Objects is designed for workgroup and power user development environments. Table 36.2 addresses some of the factors that can be used in deciding between using Oracle Power Objects and Oracle Developer/2000.

Feature


Power Objects


Developer/2000


Logical Application Size

20 tables and 20 forms

1000s of table, screens/forms

Language

Oracle Basic

PL/SQL

Case Integration

None

Strong

Portability

Windows, Macintosh, OS/2

Windows, Macintosh, UNIX, character mode

Development Team Size

< 5, no direct support

100s, direct support

Reporting

Business

Advanced

Charting

Business

Advanced

Oracle Integration

Strong

Very Strong

Resource Requirements

8MB RAM

12MB RAM

Local Database

includes ÒBlazeÓ

Personal Oracle7

In general, if you are seriously considering using Visual Basic for departmental or enterprise-wide application development, you will be better off in the long run using Oracle Developer/2000 coupled with Oracle Designer/2000 over Power Objects. However, if you can not use these high-end products, then you should strongly consider using Oracle Power Objects. The data-centric nature of the product will greatly improve your developer productivity as opposed to straight Visual Basic application development.

Summary

Oracle Power Objects is a visual, object-oriented, client/server database application development environment well suited to today's workgroup and power-user environments. With cross-platform support for the three dominant operating system Windows, Macintosh, and OS/2, and native database connectivity to Oracle and Sybase, Power Objects is a strong performer in the highly competitive, rapid application development marketplace. With Oracle's commitment to broad spectrum application development support and emerging Internet services like the Oracle Object Marketplace, Power Objects will be a strong factor in client/server application development and deployment for years to come.

Previous Page TOC Next Page Home