Contact us
Karoo Project
ZWARTBERG Research & Development

Incredibly simple PostgreSQL to WEB GUI system

PostgreSQL is one of the world's greatest databases, so I am using it for this project's database.

For convenience, I made it so that the database interface, including the SQL is organised into "service"s, which could be one or more SQL statements. Parameters are passed to the service, and columns are returned (organised into rows.)

This links up very neatly with the surf application (a dynamic web server) via "conduit"s, to dynamically fill in values in web pages and create html content for the rows returned.

So the entire web application can be created by just creating some SQL, HTML, and some XML configuration. No other coding is required. No PHP or C++, etc. is required... though you can add that too, if you like.

Following is a very simplistic example of a service:

<database name="KarooDB" username="bmodra" password=""
 connect_timeout="1" connection-pool-size="3"/>
<service name="list-stock" id="list-stock">
    select owner,type,value,count,id from
    stock where owner=<parameter name=
    "owner" type="quoted-string"/>;

Following is the corresponding html:

    <tr id="test">
      <!-- conduit rock-name:cave; service-id:list-stock; -->
      <td><!-- column owner --></td>
      <td><!-- column type --></td>
      <td><!-- column value --></td>
      <td><!-- column count --></td>
      <td><!-- column id --></td>

... which when served by surf, will produce something like this:

owner type value count id
bmodra pc 599900 1 1
bmodra keyboard 10000 2 3
bmodra desk 70300 1 6
bmodra screen 120000 1 2



Other Links:

Lazy Lizard

Large services (like an internet banking system for example), which can grow and grow and grow, to absorb the load as time goes on... and which don't suffer so much from unexplained periods of being offline, or "freezing up".

The Karoo Project

Zwartberg Reseach & Development is a registered trading name of Open Source Software Consulting CC.
Phone:+27235411462, fax:+27235411379, mobile:+27796977082,, P.O. Box 2, Prince Albert, 6930, South Africa.