puppylogo HOWTO: QUISP and SHSQL


Introduction

QUISP is a tool for serving any kind of content into web pages, by means of simple tags in HTML pages. It is an extremely sophisticated tool for creating web-based applications, dynamic web-pages, or even to serve a complete website, including use as a frontend to the SHSQL database backend. Read this page for an overview:

Overview of QUISP and SHSQL

The QUISP pet package 'quisp-128-p4.pet' is 217KB, or 904KB expanded, but half of that is a tutorial, so it really is tiny. That includes the SHSQL backend and a heap of CLI utilities.

The great thing about QUISP is that it is not just a frontend for SHSQL, it is a frontend for anything. It enables you to easily put anything into a web page, and have all kinds of interactivity.

There is a product called Ploticus that adds sophisticated real-time graphs to QUISP-generated web pages. There is also another product called EasyTimeline for adding timeline graphs. I intend to add these in the future.

Tutorial

Puppy has a built-in tutorial, launched from the menu.

The tutorial is quite good. The menu Business --> QUISP dynamic web interface runs /usr/sbin/quisp_shell which launches the Hiawatha web-server and brings up the QUISP tutorial. I have described it as a "dynamic web interface" in the menu as SHSQL is only a small part of what QUISP can do.

The above-mentioned tutorial is a nice set of examples of what QUISP and SHSQL can do, but there are step-by-step examples given in the complete HTML documention that I have placed in the 'devx' file -- see links in Documentation section below.

Documentation

There is complete documentation online, however the 'devx' file (the SFS file that converts Puppy into a complete C/C++/Vala/Genie compiling environment) has extensive documentation on QUISP and SHSQL in HTML format.

These links will be valid if the 'devx' file is loaded:

/usr/share/doc/quisp/quisp_home.html
/usr/share/doc/shsql/shsql_home.html

There are exercises in /usr/share/doc/quisp/basics.html that are a series of simple HTML pages that you can create. You have to create these in /root/Web-Server/Quisp/pages and point the web browser at them -- for example, when Hiawatha is running, the URL would be http://127.0.0.1/cgi-bin/quisp.bin?rtn=example1 which will serve the web page /root/Web-Server/Quisp/pages/example1.

Note, it would be nice if we could serve our web pages with a URL like http://127.0.0.1/example1 -- well, this can be done as Hiawatha supports URL-rewriting. It's just that I haven't learn't how to do that yet.
Note also, if you are new to setting up a web server, the 127.0.0.1 is the IP address of the local (in same PC) web server (the URL name localhost is equivalent to 127.0.0.1). Over the Internet it would of course be some domain name, like http://puppysite.com/example1.

QUISP homepage: http://quisp.sourceforge.net/
Ploticus homepage: http://ploticus.sourceforge.net/
EasyTimeline homepage: http://infodisiac.com/Wikipedia/EasyTimeline/Introduction.htm

Files

If you would like to poke around with ROX-Filer and see where QUISP is installed, look here:

/usr/bin
This has all of the commandline executables, buildix catofs dataedit dbcat newproject.sh quisputil shsql shsql_alter shsql_create shsql_fldsel shsql_join tabdef tabmaint tabo.

/usr/sbin
This has script quisp_shell, which is run from the menu. This takes care of correct startup and stopping of Hiawatha and launches QUISP pages in a web browser.

/root/Web-Server
The QUISP project files are installed here. The files that are presented in a web browser when QUISP is launched from the menu are at /root/Web-Server/Quisp/pages.

There is one commandline executable that I moved from /usr/bin to /root/Web-Server/cgi-bin, quisp, and I renamed it to quisp.bin. The reason for renaming it is that one way of getting Hiawatha to execute it as a CGI is to give it an extension. The configuration file for Hiawatha is /root/Web-Server/httpd.conf -- note that Hiawatha has a default configuration file at /etc/hiawatha/httpd.conf but the /usr/sbin/quisp_shell script makes Hiawatha use the latter config file.

Regards,
Barry Kauler
August 2009