TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
"Robert I. Eachus" <[log in to unmask]>
Mon, 12 Jan 1998 21:39:52 -0500
text/plain (56 lines)
At 06:54 PM 1/12/98 -0500, Mike Brenner wrote:
>Bob, it might be helpful to outline the complete set of software tools
>you use to do web pages in Ada, so the readers of this list would know
>what they have to purchase and what they have to download.

  uncgi is 99% of it, and it is available free on the net.  The best
written C code I have ever used, it compiled and ran cleanly on several
different platforms, and with several different web engines.  What it does
is to take all arguments to a cgi-bin program (itself), undo all the escape
codes, take the first component after uncgi as a program name, and turn all
the following arguments into environment variables.  (Works on both WinNT
and most unixes I have tried.)

   Now all you need are Ada programs to read and write environment
variables, and if you really need to set them outside your program, an
allocation routine.
I have these as three separate Ada procedures for documentation purposes,
but all they really are are interfaces to the corresponding POSIX calls.
The comments are much longer than the three or so lines of code per each.

   GNAT works fine for the compiler, and I have used VADS with the old
embedded Ada interface to Oracle, Sybase Ada Tools, and GNAT with calls to
ODBC for interfacing to database engines.  ODBC is the best, and I'd like
to publish a binding but I don't want to go through the hassle of getting
public release.  Anyone who wants to build a Microsoft free binding to ODBC
is welcome to do so and publish it.  (You probably have to work from the
public interfaces rather than starting with the C include files.)

   One last thing.  I tried using several sets of bindings to HTML, but
found that for me, the easiest was to write the HTML code with environment
and database calls where needed, then run it through an Emacs macro to add
'Ada.Text_Io.Put_Line("'to the begining of every line,'");' to the end of
the line, and double any quotes in between.  Others may find writing:

   HTML.Head(...);
   HTML.Body(...);
    ...
   HTML.End_Body(...);

   more appropriate.  The nested bindings turn out to be as hard as Lisp to
deal with.  What is really needed is an Emacs HTML Ada mode that generates
calls in pairs.  That would make writing the non-nested style a lot easier.
But in any case, uncgi makes writing "cgi-bin" scripts in Ada slightly
easier than writing basic HTML, but a lot more powerful.  I once wrote a
thousand line database access routine in Ada and had it running the same
day.  Of course more than half of the code was SQL, which I had already
debugged.



                                        Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...

ATOM RSS1 RSS2