Delphi 2 - Building Web enabled apps with Delphi 2.0

By: Borland Staff

Abstract: With Delphi 2.0's new Internet Solutions Pack, Delphi developers can directly apply their existing knowledge to building Web enabled applications.

Building Web enabled apps with Delphi 2.0
By Diane Rogers

With Delphi 2.0's new Internet Solutions Pack, Delphi developers can directly apply their existing knowledge to building Web enabled applications. The Internet Solutions Pack, from NetMasters, is included in the updates to Delphi Developer 2.0 and Delphi Client/Server Suite 2.0. Also included is DeltaPoint's QuickSite. QuickSite lets you create, publish and manage web sites. Together, the two offer a powerful solution for building and deploying Internet/Intranet applications.

Building a Web Browser
Build Internet enabled Delphi applications with familar rapid application development techniques just drop a component and interact with it's properties and events. The eight ActiveX controls of the Borland Internet Solutions Pack let you build customized Web Browsers, manage Internet mail, transfer files or connect to network newsgroups.

Delphi's eight new AcitveX controls internet enable your apps

    To build an Internet browser, begin by dropping a TPanel and aligning it to the top of your form or Tab page. Inside the panel, drop a TCombobox and a TButton. From the new Internet component page, drop down the HTML control and align to the client space.

    Use the combobox to type in the address of the Internet site you want to visit, for example, Use the button to tell the AcitveX control to open the appropriate web page. To activate the browser, add one line of code to the button:


    At this point the Browser is fully functional!

    For an easy way to track activity, create a status line by dropping down a TLabel and aligning it to the bottom of the form. Use the URL property and the OnDoRequestDoc event to display the connection status.

    label1.caption := 'Contacting ' +URL;

    Now, compile and run the application to browse the Internet!

    The combobox serves as a history list to move back and forth between the web pages visited. On the HTML control's OnBeginRetrieval Event attach:

    with ComboBox1 do
    if Items.IndexOf(HTMLCtrl1.URL)<0
     Text := HTML.URL;
    And we're done. We've built a client side application that adds full web browsing capabilities. So Delphi can handle the client side, but can Delphi do anything from the server side to respond to query requests or build virtual URLs?

    Delphi links Databases to Web Browsers
    Today, Developers use CGI to communicate between a Web Server and a database. When a user makes a request (like show me all the blue T-Shirts from a catalog), the Browser packages the query string, passes it to the web server and the web server dispatches the request via CGI to the appropriate database.

Use Delphi to add a custom Web browser to your application

    Because Delphi is a native code compiler, you can write high performance DLL's that communicate via ISAPI, NSAPI or CGI with an Internet Server. This extends client/server applications to the Internet or Intranet.

Delphi controls database communication over the Internet

    The resulting DLL is loaded once into memory and you immediately see the performance benefits of an optimizing compiler. The query results are dynamically generated, virtual Web pages, and appear to the end user as a seamless part of their web enabled application.

    Delphi 2.0 lets you customize web access and use your existing client/server knowledge to control web based applications. This internet functionality is available today.

Server Response from: ETNASC01