|
|
|||||||||
File |
|||||||||
|
The following remarks are more technical in nature. If you are only going to
use Web content and not produce it, you can skip this.
However, if you are
going to be producing and
serving Web pages, either from your own server or someone
elses, there are some technical aspects of file management and transmission
that you will probably need to know.
File Management Chores
These "housekeeping chores" for file management may
be loosely grouped into the following categories:
The details of each of these procedures will depend on how your computer is set up and how your server is set up. Therefore, we strongly advise that you consult the administrator of your particular server or another local guru for details on how to manage files and transfer them between your machine and the server. However, we include some rather generic material here to get you oriented, and to give you some terminology to use when you consult your local gurus. File Archiving and Compression
On Macintosh computers archiving and compression (and dearchiving and decompression) are commonly done with the shareware program Stuffit Lite and the freeware program Stuffit Expander. The resulting files normally have a .sit extensions. A commercial version of Stuffit called Stuffit Deluxe is also available. It is a valuable tool to have because it can translate between various archiving and compression algorithms used on non-Macintosh computers. On Unix systems the common archiving tool is called tar, and compression is normally accomplished using a program called compress or one called gzip. The resulting extensions are normally .tar for tar archives, .Z for Unix compressed files, and .gz for gzipped files. Dearchiving on Unix systems is also accomplished with tar, while uncompress and gunzip will decompress files originally compressed with compress and gzip, respectively (gunzip will also decompress files compressed with Unix compress). A common Unix operation is to archive a set of files with tar and then compress the archive. The resulting files normally have extensions that are concatenations of the archiving and compression extensions. For example, a tar archive that has been compressed using gzip will normally have .tar.gz as its extension. Such a compressed archive would be converted to the original files and directories by first decompressing with gunzip and then dearchiving with tar. The Unix archiving and compression tools have been ported to both Macintosh and PC systems, so it is possible to use and manipulate tar, Unix compress, and gzip files on those platforms if you obtain the appropriate software. For example, the commercial versions of Stuffit on the Macintosh have translators to convert these formats, and the shareware programs tar, suntar, and MacGzip implement tar and gzip/gunzip on Macintoshes.
The most common compression/archiving
tool on the PC is pkzip, which produces
files with a .zip extension. These are dearchived and decompressed
with pkunzip.
Encoding
The most common ASCII encoding on Macintosh computers is BinHex 4.0, and .hqx is the normal extension for such encoded files. The corresponding encoding that is common on Unix systems is called uuencode. BinHex 4.0 also decodes .hqx files, while uudecode decodes uuencoded files for Unix platforms. The Macintosh programs Stuffit and Stuffit Expander can also encode and decode .hqx files, and the commercial program Stuffit Deluxe can also handle uuencoded files.
For transfer of Macintosh binary files over the
network it is common that they are archived using Stuffit and then
encoded using BinHex 4.0. The resulting files usually have
an extension .sit.hqx. The freeware program
Stuffit Expander will first
decode such a
file and then will expand the archive to recover the original files or
directories that were archived. If your browser is properly configured with
helper applications (see the section on
system configuration),
it should automatically
perform the decoding/dearchiving/decompression sequence on files
having .sit.hqx extensions that are downloaded
using the browser.
Server Uploads and Downloads
The most common form of server upload or download uses the file transfer protocol FTP. Care must be exercised that binary and ASCII files are transferred in the proper mode. Image, sound, and movie files, and executable files like Java class files, are normally binary files; they will become corrupted if you transfer them in ASCII mode. On the other hand, text tiles transferred in binary mode may lose end-of-line information if the platforms between which the transfers are being implemented are different (e.g., from a Macintosh to a Unix server). In this case, the computer will probably still read the text properly, but you may have trouble reading and editing it because the line-wraps will have been changed. If you have any doubt about the character of a file, you can usually tell if it is binary or ASCII by opening it with a plain text editor (like SimpleText or TeachText for the Macintosh or NotePad for a PC). If the file has strange characters in it (if it resembles the comic strip representation of cursewords) , it is probably binary. The safest option is to transfer it as a binary file if you are uncertain. If you are going to be uploading files to Network servers, you are also well advised to bear in mind the remarks made previously about case sensitivity and blank spaces in file and directory names. Finally, if the directory structure for your Web site is complicated you will need some familiarity with directory trees and how to navigate within them on your computer and on your server (see the section on paths and relative addresses). Since these may be different platforms with different directory navigation methods, you may have to be able to do this for more than one system. We also note that in the case of a complex directory structure it may be advantageous to archive whole sets of directories for transfer between the systems. However, this will depend on the details of the two systems, since you must have the relevant software present on the two systems to archive on one end and dearchive on the other. Consult your local gurus to develop an optimal strategy for file transfer to and from your server. | |||||||||