Week 3: Choose a script
[ objectives
| links | activity ]
Objectives
[ top
]
By the end of this session,
you will be able to
-
Choose one script from
two fully documented examples or from a list of known working scripts (you
can do both if you want :-)
-
Download, unzip, read instructions,
configure, upload, customise any needed Web pages, test the script
-
Ask for guidance if error
messages encountered
-
Post an evaluation of
the script to the forum
The two fully documented scripts
(Activity 4a and Activity 4b) are examples of publishing content on
a Web server through Web based forms. Both involve saving information
on the server, which means access to the underlying UNIX file system.
There are two main ways of
using scripts to publish content on a Web server:
-
As regular HTML pages
created or modified by a script on the server in response to information
typed into a form
-
As entries in a database
(flat-file
or relational) inserted by a script
Activity 4b Guest Book:
This is an example of adding content to a regular HTML file - you can install
a guest book inviting others to comment on your Web site. When they submit
their form, the comments from the form are received by the script and then
appended to a page on the Web server. The script configuration includes
the need to specify the UNIX file system path of the file to be modified
-so you get to use paths.
Activity 4a Online Diary:
This is an example of a simple database driven system - the 'database'
here is simply a text file that holds each diary entry as a line (HTML
can be written all on one line as the actual format of the Web page is
ignored by the server - only the codes count). You can set a user name
and password for adding entries to the diary, and you can configure what
the diary looks like as well as add private and public entries. This script
requires less configuration than the guest book but involves more files
and some directories.
Pros and cons
|
Pros |
Cons |
| Regular
Web pages saved by script |
-
Search engines (both Web and
your own) can index all the pages
-
Less sophisticated scripts and
less support needed on server
|
-
Difficult to make it possible
for authors to edit their content after Web page created (it can be done
but clunky)
-
Difficult to change layouts
or 'views' of data.
-
May not 'scale' well with large
amounts of data
|
| Content
held in database |
-
All content can be edited easily
by authors
-
Different 'views' of content
are easy to arrange - just add a new 'report' format
-
Searches on fields in database
can be very quick
-
If using a relational database
you can add large amounts of data - system 'scales' well
|
-
Invisible to search engines
-
Requires more script complexity
and in the case of relational databases, more expensive server space
-
Big learning curve on relational
databases before anything useful produced
-
May need powerful server if
large database
|
Web
Links
[ top
]
-
Look for some activity around
Feb 8th! Handouts have sources for scripts.
-
Activity
| Handouts for Week 3
Listed in order of increasing
difficulty of task... pick one!
-
Activity
4a - MyDiary: install a flat-file database driven diary application
-
Activity
4b - install a Guest Book application that can save changes to pages
on your server
-
Activity 4c - Install
and test a simple search facility on your Web site (you will need to grab
some Web pages to search - make about 4 pages with some sentences in each).
The nms-simple search script is ideal for sites with less than 300 pages.
See Matt's Script Archive.
PS no handout - you are on your own with the readme, but activity
4b will help with paths.
-
Activity 4d - Configure,
install and test the demo database supplied with DBMan
from Gossamer-Threads. This
is a very customisable flat file database system. If you can get
it working then you have honourary Anorak status - seriously some programming
background will help with this one. DBMan is supported by a whole range
of modification files - for different applications.
|
[ top
]
Keith
Burnett
Last modified: 5th Oct 02