Delphi 5 Techniques
PRODUCT:
Delphi 5
By Bob Swart
Inprise (formerly Borland) has long enjoyed a good reputation for powerful programming tools. One of its most innovative tools, Delphi, has been enhanced to provide a wealth of support for Web programming. In this article, I'll provide an overview of Web development features in Delphi 5, exploring client-side techniques (ActiveX, ActiveForms), server-side techniques (CGI, ISAPI), and
multitier technology (MIDAS). Finally, we'll take a closer look at the new InternetExpress features in Delphi 5, which let you produce XML and JavaScript. For a look at some recommendations about each technique, see the box titled "Pros and Cons."
Client-Side: ActiveForms
While ActiveX controls are very popular in some development environments, there's no sense in wrapping a small component (or a component with little functionality) in an ActiveX control. But it does makes sense in Delphi to wrap the Visual Class Library (VCL) component in an ActiveX control instead of a native VCL component. Apart from that, some VCL classes can't be used as a parent base class to derive an ActiveX control. Data-aware controls, for example, need to connect to a TDataSource VCL component, and not to an ActiveX version of that component.
A Delphi VCL component is a native component written in ObjectPascal that can be used in Delphi (and C++Builder) only. An ActiveX control made by Delphi's One-Step-ActiveX is actually a single Delphi VCL component wrapped inside an ActiveX control.