A technique ive used is to write a very simple ISAPI DLL that sends the HTTP
request to a separate application using a named pipe, receives the response,
then closes the connection.

This separate application is always running and can have multiple threads
listening on that pipe to handle concurrent HTTP requests.  The windows
named pipe mechanism will automatically connect to a listening named pipe
server that is "idle".

The code isnt much different from ISAPI or CGI code, but the main advantage
is that the application is in a separate process to IIS, and you can cache
resources like database connections or query results.  If you had an
existing server-based application that was always up, you could incorporate
it into that.

Ive had to write a fair bit of extra code to achieve the same level of
functionality as all the objects provided by ASP though.  Query parsing,
cookies, session management etc.

Wilfred.


-----Original Message-----
From: Dennis Chuah [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 26 July 2000 10:03
To: Multiple recipients of list delphi
Subject: RE: [DUG]: HTML Creation



Eion,

I would concur with Nic - dump the section of the book - forget CGI and use
any one of the 3rd party tools.  There are a couple that is not on Nic's
list:

Cold Fusion - written in Delphi, script like, now can call Delphi code.
Probably THE favourite Delphi web tool.

ASP Express - (its free, you pay if you want the source) written in Delphi,
extension to ASP and lets you design forms using the IDE (Nice).  Haven't
used it in a production environment.

My opinion on the other Delphi technologies:

ASP - full of VB scripts that call COM objects, which you would write in
Delphi.  Good for simple low volume sites - need a lot of RAM if you have a
lot of users.  Has a number of known security holes, especially if you try
to connect to ADO directly from vbscript.  Possible to crash IIS from the
COM objects.

WebHub - still my preference.  Written in Delphi (100%), script like and
calls Delphi code.  Supports many technologies, including ISAPI and CGI.
Good separation of HTML from code.  Your web application runs in a separate
process space from IIS, so its not possible to crash it.  Steep learning
curve & vendor not very stable right now.  Free deployment license for
smaller sites.

ISAPI DLL - steer clear of this if possible.  Your application runs in the
same process space as IIS.  It is a nightmare to debug, and if you get
anything wrong, you stand a good chance of crashing IIS!  Need to write
multi-user, multi-threaded code.

CGI - Very slow and resource intensive - every page request results in your
app being started and stopped.  Can result in huge number of instances of
your application running at any one time.

Basically, with the last 2 options, you have to do everything yourself - its
like writing a windows app using purely WinAPI.

Regards,
Dennis.


ps.  Tell your VB contractors to start using a *REAL* language.


> -----Original Message-----
> Thanks for that. I only used CGI as it was the first example
> in the good
> and it recommended that this wasn't a good option to use anyway. We
> currently are using Delphi 4 professional.
>
> My real bone is that some contract developers we are
> currently are using
> are using VB and they really would want me to also. YUK!!!
> We currently has a delphi app which runs once each day and
> everything we
> need is in that so I DON'T want to rewrite in VB
>
> Eion
>
> > -----Original Message-----
> > From:       Nic Wise [SMTP:[EMAIL PROTECTED]]
> > Sent:       Tuesday, 25 July 2000 16:23
> > To: Multiple recipients of list delphi
> > Subject:    RE: [DUG]:  HTML Creation
> >
> > > We are just in the process of starting to look at how to creating
> > web
> > > pages out of Delphi.
> > > We have a copy of Mastering Delphi by Marco Cantu with an sample
> > program
> > > (see below) for creating
> > > as sample web page with the current time on the fly.
> >
> > Dude, dont waste your time with CGI - its not worth it. Here's good
> > options
> > if Delphi is a requirement (in _my_ order of preference,
> which is not
> > other
> > people's):
> >
> > ASP (Active Server Pages - microsoft.com? comes with IIS3,4,5 - need
> > the
> > enterprise version of Delphi 5 tho if you want to write com
> "objects"
> > for
> > it)
> >
> > WebHub - www.href.com
> >
> > WebModules (friendly ISAPI's - in Delphi 5 enterprise or upsell for
> > about
> > $450 or so on top of professional)
> >
> > ISAPI's (DLL's that link into IIS and a few other web servers. Very
> > "raw".)
> >
> >
> > And, if you dont require Delphi as a language:
> >
> > JSP (JavaServer Pages - my preference)
> > Servlets
> > PHP (ouch - oops, sorry Mark)
> > etc.
> >
> > Just please, dont use CGI - its a development and performance
> > nightmare!
> >
> > Nic.
> >
> >
> ----------------------------------------------------------------------
> > -----
> >     New Zealand Delphi Users group - Delphi List -
> > [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> --------------------------------------------------------------
> -------------
>     New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to