DBMS
 

 


Delphi 3.0

By Billy Bosworth
DBMS, April 1997

Delphi 3.0 Combines Speed With Many New, Powerful Features.


If you picked up a computer trade magazine somewhere around the fall of 1995, it was a pretty sure bet that you were going to read an article about Borland International Inc.'s visual 4GL development tool, Delphi. What was all the fuss over? Almost to a person, the answer to that question would have been speed. Borland had done what the entire industry longed for when it created a 4GL programming tool that would compile true native code executables. Until Delphi came along, 4GL users were condemned to the noticeably slower interpretive code for their client/server applications. True speed required the use of more complex 3GLs such as C++.

Delphi definitely made its mark by jumping in with lightning executables, but is that the only benefit afforded to its users today? As you will see in this review, the answer is a definite "no." With Delphi 3.0, Borland has made some significant headway toward making its development product a complete solution for Microsoft Windows developers.

What I Looked At

I reviewed a late beta copy of Delphi Client/Server Suite 3.0 (code-named Ivory), which provides many new, powerful features not supplied in previous versions.

The product was installed and tested on two different systems. The first was a Pentium 66 with 32MB of RAM running Microsoft Windows 95. The second was a Pentium 100 with 64MB of RAM running Microsoft Windows NT Workstation 4.0. I choose the default installation, which installs everything to the hard drive, and it used approximately 89MB of disk space. The full-featured installation process using the interface went without a hitch on both systems.

By taking the default installation, I was pleasantly surprised to see a well-rounded variety of tools and utilities appear in my Delphi folder. These include a database explorer, local database (InterBase), local database server, image editor, and WinSight32 --a powerful monitoring tool for Windows classes and messages. Tools of this nature prove very useful when developing large client/server systems.

Speed, Speed, Speed

The first thing I wanted to know about Delphi 3.0 is whether or not it lives up to its predecessor's speed reputation for executable code. It turns out that Borland was not content to rest on its laurels and took steps to make a good thing even better. Version 3.0 still uses the 32-bit native code compiler from version 2 that produces self-contained executable application files. For those of you making the move from your 16-bit applications, converting your code to the 32-bit environment is only necessary where low-level 16-bit datatypes are involved or where API changes occurred between Windows versions.

But speed alone is not enough in today's environment. Right now, thin is in! That is, when it comes to executables, the push is for a thinner and thinner client. Delphi's major improvement in its compiler technology comes with what it calls packages. Now you have the option of compiling your .exe separate from accompanying .dlls, which makes for a very small client application. Both the native-code compiled .dlls and the .exe are referred to as packages. (I'll look at how this fits into Delphi's multi-tier development strategy a little later.)

Getting Into the Product

Delphi 3.0 still has what many would refer to as a "Visual Basic-type" interface. It is similar enough to version 2 that users can easily make the conversion and feel comfortable with the environment; however, many new tools have been added. Each object has a separate window of information (the Object Inspector) that contains related properties and events. Another window (the Code Editor) then contains the code behind the application. Double-clicking on a particular object will take you to the procedure in the code that deals specifically with that object.

Object Orientation

Delphi 3.0 uses Object Pascal as its coding language. By design, Object Pascal exhibits all of the major object-oriented attributes, including encapsulation, polymorphism, and inheritance. For example, when you first open Delphi and create a new form (or window), the form (or window) is automatically derived from a pre-existing base-class form object. So right from the start you're using object orientation, even though Delphi does it behind the scenes.

It is possible to use some advanced object-oriented techniques in Delphi 3.0, such as overriding a particular method of an ancestor object or even creating your own base-class components. The Component Writer's Guide is a Delphi manual that explains these more challenging object-oriented procedures. Making such changes requires a fairly advanced level of object-oriented understanding, as well as an in-depth knowledge of Object Pascal. Perhaps in future releases, advanced object-oriented techniques can become more graphical -- quite a challenge indeed. Delphi ships with its Visual Component Library (VCL32), which contains more than 100 reusable components that developers can use in a drag-and-drop fashion when creating applications. These include Windows 95 interface elements such as Tree Views, Rich Edit, and List Views, as well as data-aware and multimedia tools.

Remember those compiled packages I discussed earlier? Well, all of your object-oriented programming techniques can also be used between different compiled packages. For example, an object in an .exe package can be inherited from an object in a .dll package, which in turn is inherited from another .dll package. As long as all packages are available at runtime, these kinds of object-oriented features are available.

The bottom line is that Delphi provides you with very sophisticated object-oriented capabilities. How deeply you want to dive in is really up to you.

Using Components

Our industry is in quite a frenzy over the use of ActiveX and Java components. With the battle raging between Microsoft Corp. and Sun Microsystems Inc., Delphi has set its product firmly in Microsoft's camp. Using OCX and ActiveX controls in Delphi 3.0 is taken to new levels of simplicity. There is something to be said for picking a side in this battle and staying with it because it allows for full commitment to making integration into the product as seamless as possible. In this regard, Delphi has succeeded.

Active Insight is Delphi's name for four ActiveX technologies that are used in client-side development. ActiveX Creation enables you to create ActiveX controls in one easy step. Active Forms lets you turn any Delphi window that you create into an Internet-ready Active Form. Active Web Deployment helps quickly set up your application for deployment to the Web. A built-in COM provides you with a fully compliant environment for COM and DCOM development. These technologies combine to give you more ActiveX power than ever before.

Distributed Computing

Earlier we mentioned that Delphi 3.0 allows for the compilation of relatively small executables with its package technology. This fits well into their multitier client/server approach, where thin clients are a must these days. To add to its distributed arsenal, Delphi 3.0 goes well beyond its earlier version by implementing what it calls Broker Technologies. Like their client-side counterpart, Active Insight, the server-side broker technologies consist of four main areas. Remote Data Broker allows the passing of cursor datatypes to the client as opposed to the array datatype standard in COM, DCOM, and CORBA. Business Object Broker provides robust middle-tier object location transparency to handle lost or broken connections to business rules servers. Constraint Broker propagates database constraints to the client so that work can continue even when not connected to the database (perfect for a sales force). Finally, the Web Broker provides high-speed dissemination of information over the Web using HTML and HTTP technology behind the scenes.

Delphi's Active Insight and Broker Technologies combine to give you a flexible and powerful architecture for developing distributed client/server applications.

Web Development

No review is complete in today's environment without a discussion of the Web. As we have seen, a large part of Delphi's multi-tier strategy involves using the Web, but what about actually building Web-related applications?

Figure 1 shows the Delphi development environment with the Internet tab selected on the object pallet. From this tab page you can drag and drop any of 15 ActiveX controls dedicated to Internet protocols, standards, or easy setup for Web documents. Once you drag one of these objects onto your form, you manipulate its attributes in the Object Inspector. In Figure 1, the Object Inspector shows some of the properties for the HTTP object.

Delphi's commitment to ActiveX technology means that for now you will not be able to use Java components to develop your applications. Borland provides another product, JBuilder, that addresses Java component usage, but currently Delphi is strictly ActiveX.

One last important Web feature to note is that because of Delphi 3.0's native code compiler, you are able to create ISAPI (Internet Explorer) or NSAPI (Netscape) extension .dlls to allow for both client- and server-side control for Internet applications.

When you put all of these tools and techniques together, you basically have the ability to create a fully functional Web application that will run inside of a browser right from the Delphi environment.

Database Access

With most of the focus centered on Delphi's speed, the product sometimes takes a hit from the development community in regard to database access. I found that Delphi 3.0 provides quite a robust set of database access tools.

The first of these capabilities to catch my attention was the SQL Explorer, which has been beefed up from version 2. This tool will show you database objects such as table data, constraints, and triggers, for any database to which you are connected. I was glad to see that it recognized even some of the advanced features of databases -- such as Oracle Corp.'s packages -- and that you can use SQL to modify such things directly. All of the major RDBMSs are supported via Delphi's SQL Links, including Oracle, Sybase, Microsoft SQL Server, Informix, and DB2.

The way in which you enable access to data from these databases is quite innovative. Right from the SQL Explorer you can drag and drop entire tables or specific fields onto your form. All related data access objects needed to make the connection are automatically placed on the form for you.

Delphi 3 has complete support for ODBC database connections in addition to native SQL Links drivers. Many prefer the SQL Links drivers for speed, but with improving ODBC technology, the gap is narrowing.

The Borland Database Engine (BDE) is the foundation upon which database access is built. Using the BDE, developers can code their applications relatively independent of the specific database vendor. The BDE handles vendor-specific syntax behind the scenes for functions that the developer's use, such as update. The BDE has been changed in a few significant ways.

The biggest change from version 2's BDE comes in the form of added flexibility. The developer can now choose to use the BDE for database access but is not limited to it. Developers may prefer to use a Btrieve or ODBC database engine instead. With all of the functionality the BDE provides, I don't think many developers will opt to make that switch.

To promote multitier development, Delphi lets you access the BDE from a centralized server as opposed to local access on each machine. This is used primarily when developing Web applications that need to access a database engine remotely.

The last noticeable change to the BDE is its increased support for other vendors. New additions to the list include Microsoft Access, FoxPro, DB2, and Informix.

One thing lacking in Delphi 3.0's database package is the ability to handle the newer object-relational data available in universal servers. Borland officials told me that these features will be available in later versions of the product when market demand rises to sufficient levels.

Worthy Contender

All in all, I was impressed with how far Delphi has come in such a relatively short period of time. Support from third-party vendors such as Microsoft, PVCS, and SQA show good industry commitment to the product. In addition, Delphi 3.0 offers many other noteworthy features -- such as new reporting capabilities and syntax assistance for the developer in the code editor -- that cannot be explored in a concise review such as this.

If the Windows environment is your target for development and you're looking for a 4GL tool, then Delphi 3.0 certainly should weigh in as a real contender.


Billy Bosworth is a senior client/server developer and DBA who works for Alliant Health System. He is also the coauthor of PowerBuilder 5 Developer's Resource (Prentice Hall, 1996) and cofounder of the Industrial Strength PowerBuilder newsletter. You can email Billy at bbosworth@ka.net.


* Borland International Inc., Scotts Valley, CA; 800-233-2444, 408-431-1000, or fax 408-431-4122; www.borland.com.


Figure 1.


--The Delphi development environment with the Internet tab selected on the object pallet. From this tab page, you can drag and drop any of 15 ActiveX controls dedicated to Internet protocols, standards, or easy setup for Web documents.


Subscribe to DBMS and Internet Systems -- It's free for qualified readers in the United States
April 1997 Table of Contents | Other Contents | Article Index | Search | Site Index | Home

DBMS and Internet Systems (http://www.dbmsmag.com)
Copyright © 1997 Miller Freeman, Inc. ALL RIGHTS RESERVED
Redistribution without permission is prohibited.
Please send questions or comments to dbms@mfi.com
Updated Tuesday, March 18, 1997