From: tmoran@bix.com
Subject: Re: XML-HTML Forms local execution was RE: GNAT, LINUX, KDE
Date: 1999/11/28
Date: 1999-11-28T00:00:00+00:00 [thread overview]
Message-ID: <cvh04.350$vq2.31927@typhoon-sf.snfc21.pbi.net> (raw)
In-Reply-To: NBBBJNOMKDIAJALCEFIJKEMIDFAA.rleif@rleif.com
>The original and current problem is:
>To create Ada software for processing HTML including HTML forms that
>will work totally on the client computer (PC). I wish to use HTML forms as
>the front-end for a project.
There are two different things here: HTML processing (ie, a browser),
and acting as an HTTP server. They are two separate, communicating,
programs, running on the same or two different machines. There may
be a third (or more) program invoked by the server to accept filled
in form entries and send back results. That normally runs on the
same machine as the server.
>This application can not be interrupted
>except perhaps by CTRL-Alt_Del or the reset button.
The machine running the browser cannot be reset? Or the machine
running the server + forms-handler-program cannot be reset? Or one
machine is running both?
A browser that handles full HTML, ie, displaying things in the
right fonts, with images and clickable links, is a substantial
project (Note the size of Netscape or IE). I certainly wouldn't
propose to write a browser in any small number of hours.
Perhaps with a _heavily_ restricted HTML subset.
It would be easiest if you could use a COTS browser. That would
likely mean it's running on a Windows version that is unprotected
from a user killing the browser, or turning off the machine.
A server seems much easier to subset, and a useful one can indeed
be written in a few hours and a few hundred lines. (I expect one to
join the sample programs distributed with CLAW.) Since it's a small
program that can be customized, it would be easier to have it
running under an OS where it could not be so easily killed by a
user. Or it could run on a machine that is physically protected
from user access.
As pointed out elsewhere, a server will normally process a GET
request that has a program name instead of a file name, by copying
the query part of the request string into an environment variable
named QUERY_STRING, and then calling the named program. The
QUERY_STRING is a set of name-value pairs in a simple syntax. David
Wheeler has posted a set of Ada packages that can easily be called
by such a program to fetch information from QUERY_STRING. A POST
sends info to the server like a data file, instead of in a (limited
size) environment string.
Since you control the html files, you know exactly what HTTP
subset your server needs to handle, and what it can handle in
non-standard ways. For instance, your server might call a
subroutine, passing the query string, instead of using the
environment variable + separate (cgi) program approach.
I'd be inclined to create a component for that along the lines:
package Special_Server_Package is
use Claw.Sockets;
type Server_Type is new Server_Type with null record;
procedure Get_Handler(Client : in out Socket_Type;
Path : in String;
Query : in String);
-- Called to process a GET request from Client. The request is
-- parsed just to separate the Path part from the Query part
-- (if any). The default implementation, if not overidden,
-- is to send the file back to Client if it's a file request,
-- or to put Query into the environment and execute the program
-- at Path, in the normal HTTP server style.
procedure Post_Handler(Client : in out Socket_Type;
Path : in String);
-- Called to process a POST request from Client. The default
-- implementation, if not overidden, is to put the data from
-- the client in a file, then execute the program at Path, in
-- the normal HTTP server style. An overiding Post_Handler
-- should read the data directly from the Client socket.
...
next prev parent reply other threads:[~1999-11-28 0:00 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-22 0:00 GNAT, LINUX, KDE Robert C. Leif, Ph.D.
1999-11-23 0:00 ` Preben Randhol
1999-11-23 0:00 ` Vladimir Olensky
1999-11-23 0:00 ` Preben Randhol
1999-11-24 0:00 ` Vladimir Olensky
1999-11-24 0:00 ` Preben Randhol
1999-11-23 0:00 ` David Botton
1999-11-24 0:00 ` tmoran
1999-11-24 0:00 ` Geoff Bull
1999-11-24 0:00 ` Robert C. Leif, Ph.D.
1999-11-25 0:00 ` David Botton
1999-11-26 0:00 ` Vladimir Olensky
1999-11-26 0:00 ` Tarjei Jensen
1999-11-26 0:00 ` Vladimir Olensky
1999-11-28 0:00 ` Aidan Skinner
1999-11-29 0:00 ` Tarjei Jensen
1999-12-01 0:00 ` Aidan Skinner
1999-12-08 0:00 ` Jeffrey L Straszheim
1999-12-10 0:00 ` Tarjei Jensen
1999-11-28 0:00 ` tmoran
1999-11-25 0:00 ` Geoff Bull
1999-11-27 0:00 ` XML-HTML Forms local execution was " Robert C. Leif, Ph.D.
[not found] ` <01bf38e6$27820850$022a6282@dieppe>
1999-11-27 0:00 ` Simon Wright
1999-11-27 0:00 ` David Botton
1999-11-28 0:00 ` Vladimir Olensky
1999-11-28 0:00 ` tmoran [this message]
1999-11-29 0:00 ` Alfred Hilscher
1999-11-25 0:00 ` tmoran
1999-11-24 0:00 ` Aidan Skinner
1999-11-29 0:00 ` GUI, HTTP and LynxOS ( Was:Re: GNAT, LINUX, KDE) Vladimir Olensky
1999-11-29 0:00 ` Ted Dennison
1999-11-29 0:00 ` Ed Falis
1999-12-07 0:00 ` Mario Amado Alves
1999-12-08 0:00 ` GUI, HTTP and LynxOS Robert C. Leif, Ph.D.
1999-12-09 0:00 ` Mario Amado Alves
1999-12-09 0:00 ` tmoran
1999-12-11 0:00 ` David Botton
1999-11-29 0:00 ` GUI, XML,HTTP and ORBlets (Was Re: GNAT, LINUX, KDE) Vladimir Olensky
1999-11-23 0:00 ` GNAT, LINUX, KDE Robert C. Leif, Ph.D.
1999-11-24 0:00 ` Preben Randhol
1999-11-24 0:00 ` Robert C. Leif, Ph.D.
1999-11-25 0:00 ` Preben Randhol
1999-11-23 0:00 ` David Botton
1999-11-24 0:00 ` Aidan Skinner
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox