Delphi/WebServers - IntraWeb

IntraWeb is Delphi's new way to create web pages, replacing the older Web Server Application that used TPageProducer and related components.

This new method has many advantages and several distinct problems.

Overview | Tutorial | Flash Objects | OnAuthRequest | TIWDynamicChart | Other | The Bottom Line


Overview

IntraWeb allows you to create a pseudo form - you define the web page by placing special components on the form. When the program runs, it replaces those components with html that performs similar functions.

To simplify test, the compiled program can be a web server (so you won't need IIS or Apache). When you click the Execute icon (the globe), the server tells your browser to open a page similar to the following.

When the browser requests the page, the server returns html based on the form design - you can view this code by using the browser's View Source method (in IE, just right click). Unfortunately, the html is very poorly formatted - you will HAVE to manually reformat it to make sense of it. (There is no reason for this - the pages I create using Delphi 5 are very easy to read.)


Tutorial

There isn't a tutorial - you are totally one your own with this. There is no usable help in Delphi 2006 ... unless you type in IntraWeb, then there is a whole lot of almost help. (Good luck)

The Intraweb spellbook is a simple, but very nice, tutorial (Delphi 7).

Actually, the basics are very simple

Well, its not that simple the first time

In another test, I told the firewall to leave it blocked - it still worked. Apparently, since it is a local server, it does not matter which selection you use.

Based on what I found on the internet, for 2 days I thought IntraWeb was for .NET ONLY. When I was looking through the directory structure (for examples), I found that IntraWeb supports both win32 and .NET - that was a big supprise. Apparently, support for win32 exists all the way back to Delphi 5 ... but it was not a part of the Delphi distribution until version 7.

The html contains links to 4 javascript files - I was never able to find the source for these.


Flash Objects

Flash objects are embedded via TIWFlash ... don't waste your time with this one.

Just to make the point, this static page displays one of my Flash-based graphs that will not, and can never, work with IntraWeb.


OnAuthRequest

According to the Intraweb spellbook tutorial, there is supposed to be an IWServerController.OnAuthRequest event that triggers the browser logon dialog (authentication request) - I was never able to find it.

I have an application that needs this type of functionality - I guess I will need to look else where.


TIWDynamicChart

The first time I tried to use TIWDynamicChart, there was some kind of message about it not being compatible. I spent several hours trying to figure out what that might mean - no luck.

At this point, I can no longer get the message, but BDS 2006 crashes every time I try to add a TIWDynamicChart.

This component was the only reason I tried to use IntraWeb - I have some data that I want to plot and display in a web page.

You know, if it is in the tool palette, then it should work.

I was able to get this when using win32 Delphi 2006 Architect


Other

I did not find a way to control I am sure that methods to control these are available, but I have already spent (wasted) enough time with this ... and these are not in the IntraWeb help.

Apparently, these are handled via the .NET framework - examples in basic and c# ... not Delphi. It may be possible to control these via the ServerController object which provides access to TWebRequest and TWebResponse ... but I have not tested that.

Additional notes using Delphi 2006


The Bottom Line

For some applications, IntraWeb might actually work, but for what I do, this was a complete waste of time.


Author: Robert Clemenzi - clemenzi@cpcug.org
URL: http:// cpcug.org / user / clemenzi / technical / Databases / Delphi / WebServers / IntraWeb.html