Example: Architecture of CGI script


  1. parses the input & validates it, checks it for sneaky malevolence
  2. looks in its cache and delivers result if already available
  3. If not in the cache, the makes an XML Query on the fly from a template & hands it to an XML Query engine, Galax
  4. Galax does the query and sends results back to the CGI script;
  5. CGI script saves the result in the cache at the same time as sending it back to the user;
  6. The result contains img elements that bring in image thumbnails directly.