Developing Custom Delphi 3 Components
by Ray Konopka
US/Canada:
UK/Europe:

Yes, a new edition of Ray Konopka's original book on component building is now available. It's titled "Developing Custom Delphi 3 Components". This new edition is once again published by Coriolis Group Books, and the other details of the book are as follows:
Title:
Author:
Publisher:
ISBN:
Info:
Developing Custom Delphi 3 Components
Ray Konopka (also author of Raize Components)
The Coriolis Group Books
1-57610-112-6
726 pages (CD-ROM)

SO WHAT'S NEW IN THE NEW EDITION?
A lot!
To start, the new book has over 200 pages of new information. This sounds a bit misleading because the book doesn't appear much bigger when you first see it. That's because the new book uses a thinner paper stock. As a result, you can still carry it with you in your briefcase or laptop case.
The new book is organized like the first edition. That is, it contains 16 chapters broken up into four parts. Rather than add new chapters, new material was added to new sections. If you have the first edition, navigating through the new book will be a snap.
Although every chapter was modified for the new edition, the first few chapters have relatively little new information. This should not be surprising because these chapters delve into Delphi's object model, properties, and exception handling. These topics are still extremely important to component builders, but the fact remains that these concepts have not changed since Delphi 1. Of course, the example programs in these chapters have been updated to run under Delphi 2 and 3.
I should also point out that most of the components presented in the new book are similar to the ones presented in the first edition. They're not exactly the same, because the components had to be modified to work appropriately under Delphi 2 and 3.
But didn't the components in the first book work under Delphi 2? Yes, that is correct. However, this is not to say that they worked appropriately under Delphi 2. For example, none of the components in the first book that define a component reference (e.g. TRzMailMessage) will worked correctly in Delphi 2 or 3 if the reference points to a component on another form. Form linking was introduced in Delphi 2 and requires extra steps from the component writer to ensure that the component behaves appropriately. These types of changes appear all throughout the book.
(By the way, the prefix used for each component has been changed in the new edition. The 'Rz' has been replaced with 'Rk' to distinguish the components presented in the book from the components in the Raize Components commercial product.)
The remainder of the book has quite a bit of new material. The following paragraphs highlight some of the changes:
By now, we have all heard about Packages in Delphi 3. For application developers, Packages offer another linker option. That is, whether you use packages or not has no impact on the structure and organization of your program. It simply provides an alternative way of distributing your applications. As component builders, we must become knowledgeable about packages because components must be installed into Delphi using packages. Packages are introduced in Chapter 7.
Chapter 10, which is now titled "Custom Window Components," increased in size from 59 pages to 97. In this chapter, you will learn how to interact with your components at design-time using the mouse. You'll also learn how to add custom cursors to your components. Plus, there is an entirely new section on creating drop areas. A drop area is an embedded component within a compound component that is able to accept controls dropped onto it at design-time. Using traditional approaches, this type of component cannot be used with form inheritance. This chapter presents an alternate approach which solves the problem. In the process, you'll also gain a better understanding of how form inheritance works.
Chapter 12 continues to cover Data-Aware Components, but doubled in size from 26 to 52 pages. This chapter now provides detailed coverage of the TDataLink and TFieldDataLink classes. However, the highlight of this chapter is a demonstration on how to create a component that accesses multiple records in a dataset. The example is a data-aware grid.
Chapter 13 generated the most email in my mailbox after the first edition came out. Unfortunately, in the first edition, I did not have the time nor space to cover the complete business component architecture--it just covered the TRzBusinessComponent class. In the new book, Chapter 13 increased in size from 29 to 72 pages, and covers the complete architecture. It even provides a simply expert that helps you create business components more quickly. (It is certainly not as powerful as the expert provided in the CDK by Eagle Software, but it does help if you don't have the CDK.)
Chapter 16 went through a significant change from the first edition. The chapter still discusses adding the professional touches like online help and string tables to your components. But because of the changes introduced in Delphi 3, all of the material in Chapter 16 is new. For example, your help files for Delphi 1 and 2 components will not work under Delphi 3 because Delphi 3 uses a different help engine. You need to switch over to A footnotes instead of B footnote. Also, there are no more KWF files used. This requires a new way of merging your help files with those of Delphi. This chapter shows you how.
Furthermore, the introduction of packages forces component writers to alter the way components are organized and distributed. As a result, Chapter 16 discusses how the organize your components into packages and how to distribute them-- including a detailed discussion on using Delphi 3's Package Collection Editor.
Appendices A-D from the first edition have been removed to add more space, in it's place is a single 26-page appendix which provides the most detailed coverage on converting your Delphi components into ActiveX controls. The "One-Step ActiveX" tag line that Borland has been promoting is wonderful in theory, but you'll need this appendix to bring it into practice.

As you can see, Developing Custom Delphi 3 Components does have quite a bit of new material. The companion CD-ROM has been completely updated as well. Use your web browser to navigate around the CD-ROM, which includes all of the components presented in the book, custom components from other authors, product demos, and even free trial editions of the top commercial Delphi components available.

(Ray Konopka)


More Book Reviews

This webpage © 1999 by webmaster drs. Robert E. Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.