Home/Compilers/WebAda

WebAda Interface Overview

Overview | Scripts | Templates | Macros

You can design your own WebAda interface. Parts of your interface will be on your own computer (the client), and WebAda (the server) will maintain the other parts.

Illustration of WebAda Client/Server Architecture

If you don't design your own interface, you will be using the pages defined by the WebAda developers. These pages consist of frame-sets, non-template pages, and pages generated from WebAda scripts. The links in the WebAda designed templates will only go to WebAda pages and scripts. However, if you define your own templates, the scripts will use them in place of the default templates.

Here's how you are able to design your own interface:

  • You can, of course, design pages which don't use WebAda (such as a quick reference of Ada resources).
  • Anyone can design a frame-set and fill the frames with their own pages, framesets, or pages generated from WebAda scripts.
  • The WebAda scripts use a template/macro mechanism to generate pages. WebAda allows you to define your own templates which are stored on the Server and take priority over the WebAda templates. Therefore, you can modify what a WebAda script returns when invoked. The CGI-script can be told which template to use, so user-defined templates can link to each other.

<hr>
Frame-Sets

WebAda has a non-frame and a frame-based interface. The frame-set is a file of HTML which you can easily customize by saving the source and modifying it. Your browser will have a view or save option so that you can see the source (not text) of the frame-set. Visit WebAda and then use the browser's save source to create an HTML file on your own computer...Of course, you need to know HTML or have a tool that allows you to modify HTML frames, such as Netscape Navigator Gold or Claris Homepage.

Modify the file on your computer. Some simple changes you can try:

  • Move the menu and quick reference section to the left side of the window.
  • Move the message area to the top of the window.
  • Change the work area to start with the Lovelace tutorial instead of the WebAda Notice.
  • Add another frame under the quick reference frame and move the WebAda logo to that new frame.

When you open this file with your browser, you will have your customized interface which still accesses WebAda. Each frame in a frame-set can be constructed from:

  • Regular HTML pages
  • Other Frame-sets
  • CGI-Script results

<hr>
Regular (i.e. non-template) HTML

The quick reference page is a regular HTML page and is not generated from a script. Again, your browser should have a view or save frame option. Instead of saving the entire frame set, save just the quick reference page. Again, save the source, not the text. Now you can edit the quick reference page which is now on your computer. Try:

  • Deleting the link to the WebAda notice;
  • Adding a link to this tutorial.

When you open your quick reference page in your browser, you will see your changes. However, you will not necessarily see the changes in your customized WebAda frameset (it may even be broken.) Edit your customized WebAda frameset to point to your new quick reference page, then view the frameset in your browser.

<hr>
Server-side Templates

Before you can make changes on the WebAda (client) side, you will need to learn something about how WebAda works. This section gives an overview of how WebAda templates work. Additional documentation provides details about Templates, Scripts, and Macros.

A WebAda script performs services (such as saving code or compiling), then returns a page of HTML. Early versions of WebAda hard-coded the HTML pages within the script making it difficult to design and maintain pages. Now pages are generated by expanding a template which contains macro commands. The WebAda script understands the macro commands and "fills in the blank" with information such as file names, compiler diagnostic output, etc.

Client Side

Server Side

.../file?template=echo.html
-- request sent to server,

.../file -- expands the file echo.html:
-- macros are in green



<html>
<head><title>Echo Info</title>
</head>
<body ...>

<h3 align=CENTER>Parameters</h3>

Content-type: text/html

<html>
<head><title>Echo Info</title>
</head>
<body ...>

<h3 align=CENTER>Parameters</h3>

<dl><dt><b>template</b>
<dd>echo.html</dl>

<dl><parameters><dt><b><key></key></b>
<dd><value></value></parameters></dl>

<h3 align=CENTER><hr>Environment Variables</h3>

<h3 align=CENTER><hr>Environment Variables</h3>

<dl>
<dt><b>SERVER_SOFTWARE</b>
<dd>NCSA/1.5.2
<dt><b>SERVER_NAME</b>
<dd>sw-eng.falls-church.va.us<dt>
...</dl>

<dl><variables>
<dt><b><variable></variable></b>
<dd><value></value></variables>
</dl>

<hr>WebAda Version 1.1

<hr>WebAda Version <webada_version><i>not available</i></webada_version>

</body></html>

</body></html>

You cannot change the macro definitions which WebAda understands; However, you can change the templates and other HTML pages which control the look and feel of WebAda. You can use HTML tools to layout your pages, then insert the WebAda macros.

Notice in the WebAda frameset (view source), that the file frame links to the CGI script, http://sw-eng.falls-church.va.us/cgi-bin/webada/file. Links to scripts pass parameters which appear after the question mark, ?, and the parameters are separated by ampersands, &. Type the following URL (location) in your browser:

http://sw-eng.falls-church.va.us/cgi-bin/webada/file?template=f_file.html

You should get a new window which looks like the file frame in your frameset. The HTML source was generated by the file script, using the template, f_file.html. You can look at the file template, but be careful! Don't save it until you understand how templates work.

The scripts may also perform some action. The file script will compile a program when the compile action is requested:

http://sw-eng.falls-church.va.us/cgi-bin/webada/file?action=compile&file=hello.adb&template=gnat_compile.html

After studying the details of Macros and Templates, you can tailor your WebAda interface to your needs, and if you have a suggestion that would help everyone, send it in and we'll incorporate it into the default templates!