Generic Database Application

A conventional database application can be summarised by:

Conventional Client Server Database Application

Normally middleware like perl,asp,php interfaces to the database, and selects, sorts and formats for display.

My JavaScript Client Server Database Application

My idea is this:- Use a generic perl script to append the submitted data from the form, as parameters of a JavaScript function, onto the end of a file, that is included as a normal page download. All the sorting, selecting and formatting is done using JavaScript on the client's browser.

Although JavaScript still requires some programming skill. Any novice programmer who has a PC with IE5 or netscape 4.5 has a development environment sufficent to start work. A simple graphics program and Frontpage express provide a good start.

A good HTML / JavaScript cookbook and a good HTML / JavaScript Reference is all that is needed. All the sorting select and formatting is done using JavaScript and HTML and is enough to put together simple web applications.

You need a good generic server side script ( provided by your webhoster ) that appends the form fields wrapped in JavaScript function calls to a file in your webhosted space.

You have to be happy to include this file of javascript function calls in your web pages, and how to use it to do some 'simple' JavaScript to sort, select and output HTML to summarise.

Given a nice looking page created by a WebPage creator application, and an understanding of HMTL, it is simple to cut and paste the HTML into JavaScript, so that the output is data driven by the data submitted on the web forms.

Either your page users are given explict access to the update form or the form is hidden on a maintainence page, and only invited users are given access to these pages.

We have avoided the need to set up Webservers, and a server side environment, a database, all of which require learning.

We do not need to tackle a large number of issues that normal web designers have to address just to get anything working.

Typically these could be:

  • UNIX / LINUX for PC literate people.
  • File and execute permissions, alien to PC literate people
  • Accessing MySql or Access databases, from perl,ASP or PHP
  • SQL
  • An Entity Relationship design - you are constrained to appending a generic form format
  • Learning Perl,ASP or PHP as well as HMTL, and JavaScript
  • Using Telnet and UNIX/LINUX commands
  • Learning how to open files, append strings, etc in half a dozen languages
  • Spending lots of time, on line, bug fixing simple configuration issues
  • Trying to understand how your Webhoster has set up their server, and replicate it on your model server.
  • As the ramp up of use of the application takes place, the web developer can aquaint themselves with the knowledge to set up a more robust server side application.

    I invented this to solve a solution for the Sailing Club, to which I give my time for free. I was not trying to provide many £50 ph hours of employment. These hours should have been spent out on the water. We had a problem that need a pragmatic solution. Commercially, getting the solution to market was more important than an enterprise scaleable solution.

    We expect about 5000 page hits and only expect about 200 to 300 transactions/submits per year!

    How does the ISP make any money?

    This is a difficult question, especially when they give free space, and free downloads. My ISP limits webhosting such that the page owner has to upload pages via a dial up connection. This idea would allow the website owner to allow anybody to upload 'content'. If the generic CGI script referred to a credits file, every time the script is run, it could use up some of the credit. After a number of uses, the script uses all the credit up and stops functioning.

    In my example, my CGI script refers to a file called credits.js and contains the line: credits=123 . When the script is run, this is constrained to be 0 <= credits < 1000 say, to prevent unlimited usage. If the CGI sucessfully decrements this and re-writes the file, it goes on to process the form data, if credits is greater than 0.

    There are two ways to replenish the credit:

  • Upload a blank credits.js - which costs the page owner call charges
  • The Page owner includes a CGI script like the visit counters to serve an advert, every advert boosts the credits.
  • Credits.js can be included by other pages so that the site owner can write a page that prints out the number of credits left, using javascript.

    Doug Rice

    Last updated