Home/Compilers/WebAda
[Develop your Ada program NOW!] [Welcome] [Tips]
WebAda FAQ
WebAda is a simplified Ada Development Environment. The compiler and other tools run on the SW-ENG server, and your browser controls them through a CGI. You are automatically assigned a library on the server within which you can develop your programs.
You don't. At least, not yet. We are looking at Intermetrics' AppletMagic® to build Applets which you can run in your browser. WebAda will "validate" that your code compiles.
WebAda is written in Ada and hosted on the AdaIC server. Because it is written in Ada to interface to an Ada compiler, porting should be very straightforward. There may already be an Ada compiler for your machine! If you want to port WebAda, please contact Doug Smith. We will keep a list of mirror sites as they come online.
Anyone with Internet access and a forms capable browser can access WebAda. Using a Common Gateway Interface (CGI), the server accepts these requests and invokes the corresponding program.
Here's more detail: Using CGI, the client (browser) sends a request for the server to perform some service (such as edit) and the server responds to each request. A response may be for more information, such as a form (to submit source code and file name). You fill out the form and the client sends another request (save) using CGI again to provide the needed information. The SW-ENG server looks at your remote host name and puts your source code in a directory by that name, replying this time with a message indicating success.
There is a CGI binding developed for WebAda which was derived from David Wheeler's binding, Package CGI. The WebAda binding developed by Doug Smith is more basic in some ways and more abstract in other ways.
You may prefer one approach over the other, or you can use both. There is a suggested way to transition from Package CGI to WebAda CGI, demonstrated with a conversion of the examples provided in Package CGI. By treating Package_CGI as a child package of the main CGI package (and with the demonstrated implementation), both bindings can be used in the same application.
Here is a biased-description of the WebAda CGI binding:
- A package hierarchy separates the Environment, Parameter, Characters, and Output operations.
- The CGI.Output utility performs buffer flushing to aid debugging. Without the buffer flush, if the CGI program "aborts", buffer output containing information is lost. The CGI.Output package can be enhanced to add more operations similar to Text_IO.
- The CGI.Characters package also provides CGI specific encoding and decoding. Many browsers handle this part of the CGI differently, which is highlighted by an on-line evaluation of browser differences.
- The WebAda CGI binding uses Ada strings instead of unbounded strings. This is mostly a stylistic approach and has several pros and cons.
- HTML formatting routines are entirely removed from the WebAda CGI binding.
- You are only allowed to ask about environment variables that have been enumerated in the binding. This catches misspellings, etc. at compile time. However, this is a less flexible approach. When new variables are added, the package specification will need to be updated.
- Passive iterators (an alternative to the vastly more common active iterators) were added to the WebAda CGI binding.
- Parameter values are stored in a table that speeds access with very little cost in parsing. The cost is a larger table and complex code which must be maintained. The speed benefit is lost in most applications where parameters are accessed only once. WebAda scripts access parameters extensively and benefit from the increased speed.
Compilers usually take input from a file. In the case of the GNAT compiler, the name of the file must match the name of the unit, with the extension, .adb or .ads. As WebAda matures, the file name may be generated automatically for you. In the meantime, become familiar with the compiler's way of dealing with file names.
![]()
How can I get a copy of the WebAda logo?
To download a copy of the WebAda icon using Netscape or Mosaic, click on the image with the right mouse button and then select "Save Image As..."