Webmaster
-
intro
Dear Incoming Webmaster,
I was the first Webmaster of this site,
pachamamatrust.org
and designed:
- the css stylesheets
- the interface
- file size appropriate to clients' hardware
- and the backend structure of the site.
Obviously I learnt the hard way, by experimentation and failure. It took me 3 months to develop the first css stylesheets, and 3 years of modifications to remove redundancies and maximise speed.
The css stylesheets were designed:
- to format like an easy-to-read hardcopy text
- to be visually pleasing on screen
- to reduce scripting
- to reduce file size and so speed download times.
The interface was designed:
- to be easy to read for long periods
particularly when students may have poor eyesight, and, in poor nations, are likely to have no spectacles. (Most of my Chinese students in rich GXNU had difficulty with their vision.)
- to be in A4-size for printing without editing
When you print form some sites, the right edge of text is omitted by the printer, because the page is too wide.
- to be user-friendly:
- How do you index 30,000 files, and never be more than 3 clicks from any book, or more than 3 clicks from any chapter ? And then return to the top with one click ?
The left index enables the user to return to the top with ONE click.
- How do you ensure that the user NEVER becomes lost, NEVER becomes frustrated ?
The left index always shows the user the hierarchy down which he has descended.
- A separate index, by clicking on the X in the left index, put the chapter links above the window. This allows the user to move within the book, to any chapter with ONE extra click.
- The left index can be very long, which originally meant that every time the user clicked, his part of the index disappeared down below. To overcome this frustration, the index keeps removing the unused upper sections, but allows the user to access them with one click (see the links: "....[click]" ).
- to be colorful and distinctive.
File sizes were designed for short download time:
- The files size was set at 20KB so that students on ancient computers and primitive landlines, could download before the transmission was broken. When studying at NSW TAFE in Kingscliffe, the system was so slow the transmission was usually broken, making access to the Internet impossible. With a download speed of 1.5 KB/sec, a 20KB file downloads in 13 seconds.
- Where filesizes are larger than 30KB, the size is indicated alongside the name in the index.
- Keep aware that, given 2 codes which produce the same format, one will be faster than the other. For example, we can set up a table with hidden borders to provide good formating for math equations. Each line can be rendered using its own row, or we can use < br />.
File size is smaller and download time is less, if "<br />" used in each cell instead of inserting a new row with <tr><td align="right"></td><td align="center"></td><td></td></tr>.
- Also note that if a chapter is typed in Microsoft's Word, and saved as HTML, that file size will be 8 - 10 times larger than what I script with my css stylesheets. In other words, my 20KB file becomes 200KB - far too big to be accessed on a primitive computer and landline. Imagine some poor student in Asia or Africa in a primitive Internet cafe, paying big money for 1/2 an hour. He would leave without anything.
- The space allotted to a file on a HDD, is in multiples of 16KB, namely 16KB, 32KB, 48KB, ..... Thus a 500byte file (0.5KB) will occupy 16KB on the HDD. A 22KB file occupies 32KB.
The PT webhost allows 1GB disk space for everything, including OS and application files which we might never use. If we exceed 1GB, then we are charged at a much higher rate.
It follows that the optimum files size is just under 16KB or just under 32KB, allowing for a small overhead in addressing etc.
One technique is to join 2 x 7KB files and index the topics separately, as in: href="physics/mechanics#velocity" using the # call.
The disadvantage is that if a 19KB file is joined to a 13KB file, the total of 32KB might be too large for some users. This problem should ease over the decades as old technology disappears.
A corollary of this disk space problem is that some files would be better served by instead of linking to a stylesheet, include the styles in the header, or instead of using php to call in a header, keep the header on the file.
The backend structure of the site is where you work. This requires:
- Careful indexing, scripting and documentation:
- An untrained webmaster can, without guidance, open up the website and locate everything as it is seen on the interface.
- All the index files come in the second folder f1, which must be protected from external access so users have "read" and "execute" but not "write" access.
- All the index files come in pairs, one ".php" with one ".txt".
- The php files (such as build.php) calls standard chunks of index (such as K_head.txt) and inserts its own build.txt. This gives a complete index file to project onto the left frame of the interface.
A careless webmaster would make it impossible for a newbie to take over. A lazy webmaster would be a disaster.
- Hierarchy:
- A minimum number of levels in the hierarchy, for ease of visualization and access. Thus the initial heirarchy was reduced from 7 levels to 3. [Caution: do not change it back. This structure is much much shorter in user-download time, and much quicker for the webmaster to edit.]
- Simple hierarchy to facilitate conversion to a database structure, if required.
- To reduce the heirarchy to one line of folders, would create a list of hundreds, and be very difficult to search every time one file was to be edited. 3 levels is the optimum.
- Permissions:
The folder f1 not only groups the index files next to the first level of folders, but it uses permissions to provide security to the site.
Summary
The above introduction, then, is to persuade you to NOT change the structure of the website because this will lead to many of the above problems, inefficencies and frustrations which took me 3 years to overcome. And each radical overhaul costs hundreds of hours of frustrating work. (The last overhaul took over 500 hours.)
Initially the interface took 20 - 30 seconds to download: now it takes about 4 seconds on ADSL. This is now the fastest website I have ever experienced. Let us keep it that way.
PS: The above format appears inconsistent when rendered by Firefox, but this is because Firefox's formatting of lists is inconsistent.