Review of Delphi 2.0
by
Shawn M. Gordon
President
S.M.Gordon & Associates

Introduction

Last year I reviewed an amazing RAD (Rapid Application Development) tool from Borland called Delphi. This product competes in the same area as Visual Basic from Microsoft, but Delphi version 1.0 was so superior to Visual Basic that I couldn’t imagine anyone choosing VB over Delphi. Well almost exactly 1 year after Borland released Delphi 1.0, they released Delphi 2.0, a total 32 bit development tool for Windows 95 and Windows NT. They were about 4 months late releasing the product, but I believe it was worth the wait.

Delphi comes in three different “flavors”, the cheapest being the desktop version, followed by the developer version (which is the one I would recommend), and then comes the huge Client/Server version, which is the copy I was using. Delphi is still based on Borlands own Turbo Pascal, which is an Object Oriented version of Pascal.

Features

Comparisons between Delphi and Visual Basic are inevitable, but I did that in the last review, so don’t look for to many this time around.. Delphi has a visual design environment that is similar, but superior to VB in my opinion. Look at figure 1 to see an overview of the Delphi design area. The icons along the top are logically grouped visual controls. By selecting a tab, you are able to access that sub-group of controls (or Components as they’re referred to in Delphi) for designing your form. Delphi is very friendly in the respect that each icon will give you a little pop-up description of what it is when you let the mouse rest on it for a second. Delphi can make use of it’s own VCL controls, or standard OCX controls (ActiveX).

Some of the most exciting changes to Delphi are it’s ability to access some of the lowest, and highest level routines of Windows with ease, including things like full OLE support, and multi-threading. VBX controls have been dropped now, but as mentioned above, OCX is fully supported. Delphi 2.0 even ships with several OCXes for creating charts and spreadsheet grids. OLE automation servers written in Delphi can expose their functionality for access by other applications running on the same machine or remotely. The only real problem here is that trying to create a remote OLE server is possible, but far from easy, and Delphi doesn’t really provide any help here to automate the process.

A couple of other significant enhancements is you can now have strings much much larger than the 255 byte strings that were in Delphi 1.0 (part of PASCAL’s legacy), there is also a new variant type the is similar to the VB variant type, and new currency types.

The Delphi 2.0 compiler now shares its code generation back end with the Borland C++ optimizing compiler. Two benefits of this stand out. The first is that the compiler no longer stops at the first syntax error it encounters. Now all errors are trapped so you can correct then in one sweep, like standard C++ environments.

The second benefit is that Delphi 2.0 supports the standard OBJ file format, making it simple to build a project that will use modules written in other languages. I must note that it is much faster to link objects in Delphi’s proprietary unit format. You can still build a DLL in Delphi.

With all this talk about the World Wide Web, I thought I would mention that there is a TON of software on the Web available for all flavors of Delphi that let you do all sorts of Web type things, like CGI programming. The list is to long and exhaustive to get into here, but if you are interested, you should take a look.

Building an application just consists of dragging objects off the tool bar and dropping them onto your form. By using on of the “experts” when you start up, you can have a default interface generated for you that you can then customize to your hearts content. Actually by selecting “New” from the File menu you can have Delphi build just about anything for you, like a DLL, Automation Object, forms, Win95 logo application, Dialogs, the list goes on and on. I was able to build a shell application that had all the standard menu bar options, a graphically speed button bar with pop up help, and a status line, in under a minute without typing any code at all. Of course the only thing the application actually did was exit, but to be able to get that much graphical work done without any sweat on your part is pretty nice.

When you want to add code to an object, you can either double click on the object for the “OnClick” event, or go to the Object Inspector pane and select the event. The event handle will then be generated for you in the code window and then you just type your code. Your code is actually all in one file that you can scroll through, which can be both a good, and bad thing, but I like having it all there easy to get to without having to go through a bunch of menu prompts if I didn’t want to.

One of the “great” things about OOP coding is that you can inherit from objects and extend or change their functionality. A good example is say you want to by default have a button type that supports an image on it (this is included in Delphi already, but I will use it for this example). You could create a new class that inherited it’s behavior from the standard button, but added the image attribute to it. You can do this with any object that is included, or you buy, or you create, this is powerful technology and has typically only been available to C++ programmers.

A new feature of Delphi is the ability to inherit from a form, so you could create a standard form layout that you want to use for all your applications, make it an object, and then you could start all your forms by using this custom form object to get all your default attributes.

I am not going to get into the Client/Server aspect of the software that much because to my mind it isn’t really Client/Server. The C/S version does include a small version of Interbase, and some very robust tools for browsing and accessing data sources, Figure 2 shows the SQL explorer which is what will let you scoot around the data bases.

Last time around I also talked about a product that converted Visual Basic to Delphi. This time I want to talk about another such product, that is far superior in my opinion than the previously reviewed Conversion Assistant. This product is called VB2D and is available from Eagle Research at 415-495-3131. The current limitations on VB2D is that it only works with VB3 and Delphi 1.0, however by the time you read this it should support VB4 and Delphi 2.0. The other limitation is OLE code cannot be handled, and will be ignored.

Using VB2D is simple, just select an existing VB project, and indicate where you want the Delphi output written, and away it goes. I have to say though that VB2D is amazingly slow, a good size project could take an hour to convert, but that is still much quicker than you doing it yourself.

The real magic in VB2D is that Eagle Research has created a series of Delphi controls that simulate VB controls. This includes things like the Variant type, redimesionable arrays, and strings greater than 255 characters. Virtually everything that doesn’t have a Delphi equivalent has been supported by Eagle Reesearch, it’s this attention to detail that makes this a superior product. Actually it’s almost worth getting just to get the enhanced controls.

If you are using the JET engine extensively for data base access, you will probably have some trouble converting your project very thoroughly. VB2D has very thorough, concise documentation and on-line help. They are very straight forward about what you can and can’t expect, and don’t claim to do everything, but they certainly do a lot. So if you decide to jump to Delphi from VB, it can be done without as much pain as you thought.

There is also a data dictionary included in the product now. This feature makes Delphi support functions typically found in products like Clarion, and makes it easy to build and support business database type applications.

Delphi 2.0 picks up where 1.0 left off, it is a great extension of the product. The biggest problem and complaint is that 2.0 is 32 bit only. This means Windows 95, or Windows NT. To Borlands credit they at least include a copy of 1.0 with your 2.0 purchase, and it is pretty easy to go back and forth between versions, as long as you don’t use anything that is specific to 2.0. There are also changes and enhancements to the language, which I hate to say would probably make trying to maintain one source for both 16 and 32 bit rather difficult. However if you don’t need any of the new features, you could probably manage it.

Usability (also installation)

The standard installation is on CD-ROM, I’m not sure if you can even get it on diskette, and I don’t think you would want to given the size of the software. I wish I could give the actual size of the installation, but Windows 95 doesn’t give you a good quick way to see how much disk space a directory structure takes. In any case the software install’s easily and cleanly.

The interface is quite easy to get use to for those of you who have used any other RAD type tools, but if windows programming is new to you, then you will need a couple of hours to get use to it.

Reliability

So far I haven’t run into any noticeable problems with Delphi, and I haven’t noticed any complaints in the support boards, so I have to assume that everything works as advertised.

Performance

Delphi is a little slow to start up, but it zip’s right along once it’s going, when you consider that it is actually doing a compile of your code, and not just syntax checking, you won’t believe how fast it is. It seems that it is barely slower than a VB pseudo-compile. The original Delphi was up to 10 times faster than Visual Basic, and the new Delphi seems to be about 4 times faster than Delphi 1.0.

The performance is so great, and the environment so good in Delphi, that there is no reason to have to work with any other language.

Supportability (including Doc)

For some reason the Delphi 2.0 online manuals are in standard Windows Help file format, the 1.0 manuals had been in Acrobat format, which I had liked quit a bit. It is pretty easy to find what you want this way. You can also check the hard copy documentation, which is pretty well laid out. There are five manuals included that cover each aspect of Delphi. You have the ‘User’s Guide’ which goes over basic skills, programming with Delphi, and sample applications. A ‘Database Application Developer’s Guide” that covers database components and tools, and building Client/Server applications. A “Local InterBase Server User’s Guide” (InterBase is Borlands portable relational database). “ReportSmith for Windows” manual (ReportSmith is Borlands commercial report writer) that covers creating and formatting reports, the macro language, runtime viewer, and the data dictionary. The Object Pascal Language Guide, which wasn’t included in Delphi 1.0, but could be downloaded, a Reference Library Guid. And finally the “Component Writer’s Guide”, if you can get good at writing components you could make a fortune. The problem you will probably have is knowing what question it is you want to ask.

Trying to call a company like Borland or Microsoft for help can be a real exercise in patience, and as you have probably found in the past with PC programs, it’s easier to find out yourself somehow. Borland does offer a few options for support, there is “Up and Running” which is a short freebie that only makes sure you get installed and running with no problems. There is the “Pay-as-you-go Support” option which has three sub-options, the Advisor Line is $2 per minute, the first minute is free. The “Client/Server connectivity Incident Line” which is $200 per incident and guarantees quick response, and then the Borland KnowledgBase CD which is a $249 subscription and you get quarterly. Then you have an Annual Contract which can vary from $149 a year to $3000 depending on what options you get. It’s nice that Borland is offering options, and for us MiniComputer types, we are used to paying annual support anyway.

The CompuServe Information System is a great place to get support on many products, and Borland has a forum just for Delphi 1.0, GO DELPHI, and a new forum for Delphi 2.0, GO BDELPH32. I found that this is the best way to get help. There is also a gentleman in this forum that is doing a volunteer monthly newsletter for Delphi that is in Windows help file format. I have gotten every issueo so far, and they are very helpful. Also, the amount of answers you can get for a question on CompuServe can almost be overwhelming, but it is always pretty quick. I strongly suggest CompuServe as a support service for pretty much everything, I have been using it for about 10 years now.

Summary

So what do we have? Delphi 2.0 combines RAD tools, strong database tools, and a true compiler into a single tool that makes it more of a 3 1/2 GL, making high-performance object-oriented development accessible to us mere mortals who go into a coma every time they see C++, I love it.

There is a new tool coming out called OPTIMA++ that is supposed to give a Delphi-like front end to C++. If that is true, then there could be some competition to Delphi, but at this point, for me, Delphi is the only way to go for writing Windows and Client applications. Nothing comes close to it’s power, speed, and extensibility. Now that you have integrated version control, you can easily let your developers loose. My only regret is that with JAVA getting so popular it seems to be taking time away from the products that people are actually using. Borland is going to have a Delphi-like product out by the time you read this called Latte, that is going to do for JAVA what Delphi did for Object Pascal. I guess we’ll see.

I bought several of those “Teach Yourself…..” type books to help expedite my learning of the language, and I want to stear everyone away from one absolutely terrible book, it’s the “Teach Yourself Delphi in 21 Days”. I had always been impressed with this series until now, the book has almost no tutorials, is filled with errors, and is just basically a bad investment. The “Delphi for Dummies” book is a very good introduction, and is probably a good place to start. There is at least a dozen other books out there, but of the four I have, these two stand out at either end of the spectrum.

If you are a Pascal programmer to begin with, you should have no trouble picking this up. Make no mistake, there is a higher learning curve than Visual Basic, but you are going to be happy that you spent the time.

At-a-Glance box

Delphi version 2.0
Borland International
800-336-6464 ext 50151 (or go to any computer store)

List price is $2000 for the Client/Server Suite, $500 for the Desktop version, and $800 for the Developer version. Street prices are usually about half the list price, and upgrade prices are even better. Support options are described the Supportability se
ction of this review.