RAD Studio
ContentsIndex
PreviousUpNext
Creating Web Server Applications with Web Broker

Web Broker components (located on the Internet tab of the Tool palette) enable you to create event handlers that are associated with a specific Uniform Resource Identifier (URI). When processing is complete, you can programmatically construct HTML or XML documents and transfer them to the client. You can use Web Broker components for cross-platform application development.

To create a new Web server application using the Web Broker architecture:

  1. Select FileNewOther.
  2. In the New Items dialog box, select the New tab under Delphi Projects and choose Web Server Application.
  3. A dialog box appears, where you can select one of the Web server application types:
    • ISAPI and NSAPI: Selecting this type of application sets up your project as a DLL, with the exported methods expected by the Web server. It adds the library header to the project file and the required entries to the uses list and exports clause of the project file.
    • CGI stand-alone: Selecting this type of application sets up your project as a console application, and adds the required entries to the uses clause of the project file.
    • Web Application Debugger stand-alone executable: Selecting this type of application sets up an environment for developing and testing Web server applications. This type of application is not intended for deployment. Choose the type of Web Server Application that communicates with the type of Web Server your application will use. This creates a new project configured to use Internet components.

Name 
Description 
The project that is set up for your Web application contains a global variable named Application. Application is a descendant of TWebApplication that is appropriate to the type of application you are creating. It runs in response to HTTP request messages received by the Web server.
Warning: Do not include the Forms or QForms unit in the project uses clause after the CGIApp, ApacheApp, ApacheTwoApp, or ISAPIApp unit. Forms also declares a global variable named Application, and if it appears after the CGIApp, ApacheApp, ApacheTwoApp, or ISAPIApp unit, Application will... more 
The Web module (TWebModule) is a descendant of TDataModule and may be used in the same way: to provide centralized control for business rules and non-visual components in the Web application.
Add any content producers that your application uses to generate response messages. These can be the built-in content producers such as TPageProducer, TDataSetPageProducer, TDataSetTableProducer, TQueryTableProducer and TInetXPageProducer or descendants of TCustomContentProducer that you have written yourself. If your application generates response messages that include material drawn from databases, you can add data access components or special components for writing a Web server that acts as a client in a... more 
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!