| Cesar Rabak 2004-03-27, 12:10 am |
| Martin Sondergaard escreveu:
[snipped]
>
> The way CGI works is like this.
>
> The user fills in a form in a Web page (an HTML page),
> then clicks the Submit button on the page.
> The page is sent to a CGI program on the web server.
> The CGI program on the web server starts up,
> generates an HTML page as a reply, then sends it back to
> the browser which sent the web form.
> Then the CGI program is shut down.
>
> So every time the user clicks on a Submit button, the CGI program
> is started up and shut down.
>
> If the program which is on the webs sever is a Prolog program,
> when the user clicks on the Submit button,
> the Prolog interpreter starts up, then it loads up the Prolog program,
> then it "consults" a Prolog database, all of which takes several seconds.
For this to work you'll need to have the Prolog program to be considered
executable in the platform the Web server runs (perhaps with the
sheebang trick), so isn't it more simple just compile the Prolog program
in a native executable anyway?
AFAICT Prolog programs will always be more or less platform/compiler
dependent so leaving them as 'scripts' has not many advantages.
Do you agree?
--
Cesar Rabak
|