Overview of technical documentation
 

Introduction

The chapters containing the technical documentation are intended to give a deeper insight in how the different modules of the package work and in what way they are interconnected. It is the authors hope that this, togheter with the source code documentation will provide the necessary guidance for futher improvements of the package.

The areas that are covered in technical documentations are:

  1.     Presentation of the modules (described below in this document)
  2.     System installation on server
  3.     QuestionPages
  4.     Cgi scripts
  5.     Server directory structure and file syntax
  6.     CreateCourseApplet
  7.     MakePage and ReadAnswerApplet
  8.     Integration of new QuestionPage types into the system
  9.     Security
  10.     Problems

Presentation of the modules:

The code in the project could be divided into three distinct parts (the pharentesis refers to the languages used in the responding module):

The relations between the modules are displayed in Fig. 1.
Fig 1.  System information flow

QuestionPages:

The QuestionPages are the only part of the system accesible for the students. As described above, a student could either be given feedback to his answers directly or the answers could be saved on the server. In the latter case, Html standard code is used to send the answers to a CGI script, the script stores the answers on file. As the answers are similar for the different question pages types, we managed to use the same Cgi-script for all.

Applets:

There are three different Applets in the system:

The Applets are all written in Java 1.1.x, which have a lot of nice grahpical features as well as others. A downside however is that there are a lot of technical problems with Java 1.1.x.  Browser using different versions of Java maybe beeing the worst one. This was the main reason why we didn't use Java, in the QuestionPages used by the students.

The Applets mentioned above are instead, only used by the teatcher. As the teatcher are a relative small group of pepole we belive that it will be possible, without to much effort, to inform them about; and assist them with; the technical Java problems. To place and retrive information on the server the Applets calls Cgi - scripts. For placing infromation the Applets calls Cgi-scripts using either the GET or POST method. With GET the information is put in the URL, with POST it is sent through a stream. The reading is done in a similar way, when called  the CGI scripts returns HTML pages with information these are then read by the Applets.

All applet-CGI-Server communication is done through a class DataLoader, see Fig.1. The DataLoader could be looked upon as an abstraction layer, responsible for the Applets net IO. The idea of using the DataLoader is of course to make it easy to change the way Applet communication is done. Instead of using Cgi-script the system may be design to use for example Java remote objects without to much changes in the Applet core code.

Cgi - script

All net communication in the system is done using Cgi. The reason for choosing Cgi were:

  1. It is simple.
  2. It is the Internet standard and can therefore be expected to be  installed on most servers.
The main disadvantage with Cgi is that it is slow, each time the Applets needs to communicate a connection has to be made. To increase performance we therefore tried to put as much information as possible in each CGI call, but still we ended up with quite a few Cgi scripts.
All but one of the 17 cgi scripts on the server are used by the Applets to communicate with the server. There is only one that is used for storing the students answers on the server.