Installation and a short primer ------------------------------- Revised July 16, 2001 kbmWABD has been compiled and running successfully under Delphi 3/4/5/6 and Borland C++ Builder 3/4. -- Unzip kbmWABD_xxx.zip in an empty directory (eg. projects\kbmWABD) xxx is the version number. -- Get the resource_xxx.zip file from the place you downloaded kbmWABD_xxx.zip and unzip it in a subdirectory named ressources (eg. projects\kbmWABD\ressources) Get the WWWserver_src_xxx.zip file from the place you downloaded kbmWABD_xxx.zip and unzip it in a subdirectory named WWWServer (eg. projects\kbmWABD\WWWServer) Get the basic_xxx.zip file from the place you downloaded kbmWABD_xxx.zip and unzip it in a subdirectory named basic (eg. projects\kbmWABD\basic) -- WWWserver_src_xxx.zip contains an ISAPI capable webserver which can be used for easy debugging ISAPI applications. The webserver can also be downloaded as an exe file. Check http://delphi.e-indexit.com resources_xxx.zip contains some gifs and javascript files for support of the TWABD_MenuTree component. kbmWABD_xxx.zip contains the complete source code for WABD in the kbm incarnation (2.xx and newer). basic_xxx.zip contains a skeleton project for D5 for a simple Hello world ISAPI application. -- Delphi 6 ======== 1) Open the runtime package kbmWABDD6Run.dpk and compile it. 2) Open the design time package kbmWABDD6Des.dpk and compile and install it. Delphi 5 ======== 1) Open the runtime package kbmWABDD5Run.dpk and compile it. 2) Open the design time package kbmWABDD5Des.dpk and compile and install it. Delphi 4 ======== 1) Open the kbmWABDD4.dpk file, compile it and install it. Delphi 3 ======== 1) Open the kbmWABDD3.dpk file, compile it and install it. C++ Builder 4 ============= 1) Open the kbmWABDC4.bpk file, compile it and install it. Then a new tab (kbmWABD) will show up in the component palette. -- All components must be placed on TDatamodule's not a TForm's. -- Currently the following components shows in the palette: TWABD_SessionMgr - Handles all request from the ISAPI server and directs the requests to the right session or creates a new as needed. Futher it handles statistics and alot more. There must be only one session manager component and it must be placed on a TDatamodule by itself (possibly together with a TWABD_Admin component). A TDatamodule with a TWABD_SessionMgr on it is called a session manager module. TWABD_Session - Handles a specific client session. A number of TWABD_Session's will be automatically created by the session manager (TWABD_SessionMgr). TWABD_Session must not be placed on a session manager module. Only one TWABD_Session can be on a TDatamodule. There can be (but usually are not) several TDatamodule's with each one TWABD_Session. The sessionmanager can then decide which session datamodule should be create for different applications within the same ISAPI dll. (The administration module is implemented that way). A TDatamodule with a TWABD_Session on it is called a session module. TWABD_Admin - Is used to set up diverse administrative settings. If its used, it must be placed on a session manager module. TWABD_Setup - Is used to specify paths for images and files. It must be placed on a session module and there can be more than one TWABD_Setup on it. TWABD_Frameset - Is used together with TWABD_Frame to specify frame layouts. It must be placed on a session module and there can be more than one TWABD_Frameset on it. TWABD_Frame - Is used together with TWABD_Frameset to specify frame layouts. It must be placed on a session module and there can be more than one TWABD_Frame on it. TWABD_MenuTree - Is used to generate a javascript based menutree on the client. It must be placed on a session module. TWABD_Form - Is used to generate advanced forms using a form editor (dbl click to open the editor). It must be placed on a session module. There can and often will be more than one TWABD_Form on the same session module. When the editor is open, a host of other socalled toplevel objects are available. When a TWABD_FormSection is added to the TWABD_Form, a list of section level objects becomes available. TWABD_Javascript - Is used to contain Javascript code. It is the referenced from a TWABD_Frameset, a TWABD_Frame or a TWABD_Form. There can and often will be more than one TWABD_Javascript on the same session module. TWABD_HTML - Is used for holding raw HTML code. The HTML code can contain variables of the form [!--VariableName--!] which will be automatically changed by the session manager module to the contents of the variable if found. Variables are setup using the property editor or at runtime by ASessionMgr.VariableByName['VariableName']:='Some value'; TWABD_HTMLFile - Is used for referencing an external HTML file. The file contents can be cached if needed. TWABD_ExternalFrame - Is used for directing output to a frame external to kbmWABD or a new browser window. -- To start a bare bone ISAPI application do the following: - Create a new DLL project. - Create a new TDatamodule. Name this dmSessionMgr. - Create a new TDatamodule. Name this dmSession. - Put a TWABD_SessionMgr on the dmSessionMgr module. Name it SessionMgr. - Put a TWABD_Session on the dmSession module. Name it Session. - Add code to the event handler for OnCreateSession on SessionMgr: procedure TdmSessionMgr.SessionMgrCreateSession( var NewSession: TWABD_Session; Request:TWABD_CustomRequest); begin with TdmSession.Create(nil) do NewSession := Session; end; - Add code to the event handler for OnDestroySession on SessionMgr: procedure TdmSessionMgr.SessionMgrDestroySession( Session: TWABD_Session); begin Session.Owner.Free; end; - Add code to the end of the dmSessionMgr unit, just before the end. statement: initialization dmSessionMgr := TdmSessionMgr.Create(nil); - Add WABD_Request to the dmSessionMgr unit's uses clause. - Put a TWABD_Form on the dmSession module. Name it frmMain. - Double click frmMain (or right click it and choose 'Design WABD form'). - Add a TWABD_Formsection toplevel object and select it in the list. Press F11 to open the property editor, and set the name to fsMain. - Now add a TWABD_Label section object (child object) to the framesection fsMain. Using the property editor set the name to lHello. Set the caption to 'Hello world'. - Make sure the directory in which the WABD dcu/pas files are placed, is in the projects library search path. - Save the project. - Compile it. - Set the Host application in the Run/Run Parameters dialog to the wwwserver.exe. If you have not generated the wwwserver.exe, open the wwwserver.dpr file in the WWWserver subdirectory and compile it. Then reload the test project you have just saved. - Run. Then a test web server will start in the toolbar of the taskmanager. You can rightclick the webserver to shut it down or open a administration window. - Start your browser and specify the address: localhost/myproject.dll where myproject.dll is the name of the DLL you have just created. Now try checking out the other components and objects available in kbmWABD. best regards Kim Madsen kbm@optical.dk