Introduction
This is the start of a section on specific technical software
issues in setting up a weather reporting
website. The topics covered include:
To skip this more technical section and continue on with the
description of setting up a simple weather
reporting website, follow this link to
the
suggested OLAWS system page.
Weather Reporting Websites and web servers
Constraints arising from how web servers operate are perhaps the
trickiest issue to understand although there are a couple of relatively straightforward solutions.
These constraints come into play in the form in which the data will
eventually appear on the Internet web page and, more specifically,
how updates to the data are integrated into the served web page.
This is a major determining factor in how the
whole system must be constructed.
We need to take a small diversion to consider how a web page is
generated and accessed. Most readers who have made it this far will
know that a simple web page is specified by a file containing a
series of HTML statements which contain both the text content of the
web page plus instructions for displaying the content, together with
all image files to be displayed on the page. This HTML file (plus
the image files) is served from the remote Internet server when the
browser on a visitor's PC requests that particular page. The key
point is that, on a simple webserver model, the HTML file must
pre-exist in its final form on the web server. There is no way, in
this simple model, for the web server to create the HTML 'on the
fly' and, for example, to include the latest updates of weather
data. Therefore for updated information to appear on the final web
page, updated source material - either complete HTML files
or image files - must have been previously uploaded from
the AWS-linked computer to the web server every time an updated page
is due.
In reality there are several ways in which a web
server can generate HTML files on the fly. One
traditional approach is to use a Unix-compatible 'language' like
CGI, which runs on the web server - not the local PC. A more recent
approach for web servers running the Microsoft IIS server software
is another server 'language' called ASP ('Active Server Pages')
which is somewhat easier to program. These are all approaches which
are specially and professionally designed to incorporate data,
present on the server in a regularly-updated database, into served
HTML files and which would almost certainly be used in a
sophisticated professional system. The catch is that to implement
these clever systems is an order of magnitude more difficult than
the more elementary approach described below. And you will also need
access to the appropriate type of web server and have been granted
appropriate 'permissions'.
So the simple approach reduces to creating a new HTML file
locally and uploading this every time an update to the weather data
is required. In practice, there are still problems with even this
simplified approach. The latest version
of specialised weather software such as Virtual Weather Station (VWS)
and Weather View 32 (WV32) have a pre-prepared
HTML file with placeholders for individual items of data. The weather software itself then produces the final HTML page
file. Unfortunately, while attractive and powerful, this approach is
not without its own drawbacks, specifically that it will only work
smoothly with relatively unsophisticated web site administration.
Owners of websites larger than a few pages often prefer to use
website management software, such as Microsoft FrontPage, which can
be very valuable in taking the strain of day-to-day administration
of the site. (These website managers are software tools which, in
addition to creating individual web pages, can also co-ordinate
pages into a well-integrated site, by ensuring, for example, that
all internal links in a site are fully up-to-date and performing
many other administrative tasks.) Unfortunately tools
like MS FrontPage (FP) cannot readily be used to perform automatic
updates and any attempts to bypass FP and to use alternative means
of uploading HTML files to the remote server (eg standard FTP
clients) cannot be recommended because it can lead to
desynchronisation of local and remote web sites. Nonetheless for
users happy to manage their websites directly in the traditional
manner, this placeholder approach is potentially quite a useful one.
There is one other, more widely applicable solution to this
problem and that is to include the updated weather data as
individual graphic images which are then displayed on the relevant
web page. Suitable image files are often generated directly by the
weather software and can be readily uploaded without
disrupting the normal operation of FrontPage-like web managers.
Embedding data within images has one other significant advantage in
that image files of standard types (ie .gif and .jpg) are correctly
displayed by the great majority of browsers likely to be used by
typical visitors. In contrast, to achieve attractive display of text
values on an HTML page often requires the use of layout techniques
which are not universally supported by common browsers. While the
use of graphic images is arguably the easiest and most generally
applicable solution to the upload problem, no approach is
without its foibles. In the case of image files, the problem is
download size. For web pages to download quickly from the server,
their size must be minimised. Graphic files tend to be relatively
large (eg 5-40K). This does not preclude their use as an easy
solution to updatable content, but does require that a significant
amount of development effort is put into making their file size as
small as possible.
Summary
Although there are a number of possible mechanisms to include
updatable content in web pages, there are only two simple approaches
suitable for non-programmers. Either the weather data is embedded in
graphic images (in which case efforts need to be made to minimise
the size of the resulting image files in order to speed up download
of the web page) or text data fields can be inserted into html
placeholders on a pre-existing web page. The placeholder approach is
however not well suited to use with web site management software
such as Microsoft FrontPage. How these two approached are
implemented in commercially available software is described on the
next page on
web data
methods. |