Sections 7.2 and 7.4 of the UMUC Programming Guide are obsolete. The purpose of this note is to provide substitute information, which I hope is not obsolete.
Section 7.2 explains how to build a web page. It is a quick tutorial in the use of Netscape Composer, which was bundled with Netscape Communicator. Netscape Communicator is no longer available. The only free download you can find on the Netscape web site is Netscape 8.0, which is just a browser.
There are three ways to build a web page:
Before reading on, please do the following steps:
Now carefully compare the printout of the file to what you see on the screen. Try to figure out the meaning of everything you see in the printout! And, now you know that an HTML file is just a text file of a certain format, that describes the content and layout of a web page.
1. Using a general-purpose text editor
A general-purpose text editor is a program to edit text files. Back in the DOS days, there was a text editor called ed. You controlled it by entering commands, and you had to know the commands. In UNIX systems (including nova.umuc.edu), there are several command-line-oriented text editors including vi, emacs, and pico. In Windows, we have Notepad.
So you can build a web page by writing it directly in Notepad or any other text editor, saving it, and changing its name to end in .html.
2. Using an HTML-specific text editor
There are a number of text editors on the market that include features to make writing correct HTML a lot easier. For example, highlight some text and click the Italic icon, and the editor inserts <i> and </i> around it. There is a Preview button that opens the page in your browser so you can see what your page will look like without closing the editor. Close the browser and you are back to editing mode.
One HTML-specific editor that may be adequate for doing your project is CoffeeCup Lite, which may be free.
3. Using a WYSIWYG HTML composer
WYSIWYG stands for What You See is What You Get. A WYSIWYG HTML composer is like a GUI word processing progam: you type, and click on any of a few dozen icons or menus to call up features, and the program composes HTML for you. Netscape Composer was a relatively basic WYSIWYG HTML composer. Of full-featured HTML composers, the best known are Microsoft FrontPage and Adobe (formerly Macromedia) Dreamweaver. Both are pricey and take a goodly amount of time to master.
One inexpensive WYSIWYG editor is CoffeeCup. There are probably several more out there.
Do not use a WYSIWYG HTML composer for your project. Because a WYSIWYG HTML composer does all the dirty work for you and hides the result, you don't learn anything, which defeats the purpose of doing this little project.
FTP stands for File Transfer Protocols. It defines a procedure and method for transferring files from one computer on the Internet to another. It is one of the oldest of the Internet protocols. You will use FTP to transfer the files that make up your web site to the www subdirectory of your home directory on nova. The files have to be put in the www subdirectory because that is where the Apache web server software on nova will look for them when it receives a request from a browser.
There are two ways to use FTP:
1. The original command-line way
FTP is designed to be run in a command-line environment, like DOS or UNIX. Try it briefly. In Windows, select START, then Run, then enter ftp nova.umuc.edu. You will be asked to log in to your class account. Do so. Then enter the following commands:| help | You will see a list of all the commands available |
| help [enter the name of any command from the above list] | You will see an extremely terse description of the command whose name you entered. |
| dir | You will see a list of all the files in your directory on nova. |
| get [Here insert the name of any of the files in the list you just saw. If a file name contains any spaces, enclose the file name in double-quotes (").] | The selected file will be copied from nova to your computer. |
| quit | You will be disconnected from nova. |
In the process, the selected file on nova will have been copied to your computer. Try to find the copy. Good luck!
A fundamental concept in file transfers is the "current directory (or folder)". At any moment in time during af ftp session, you have a current directory on your own computer, and a current directory on nova. When you upload a file, the file is copied from the current directory on your own computer to the current directory on nova, and when you download a file, the file is copied from the current directory on nova to the current directory on your own computer.
Of course, you would expect command-line FTP to provide commands for managing current directories on your home computer and on nova. Unfortunately, the commands provided are very limited: you can change the current directory on your own computer lcd command, you can change the current directory on nova (the cd command), and you can see a list of the files in your current directory on nova.
In addition to the commands described above, command-line ftp provides the following commands:
| cd | That stands for "change directory". It is used to change the current directory on the nova server. Examples: cd www changes to the www subdirectory of the current directory. cd .. (note the two periods) changes to the parent directory of the current directory. |
| lcd | That stands for "local change directory". You use it to select a folder on your own computer. Examples: lcd "My Pets" changes the current directory on your own computer to the "My Pets" subdirectory. (Note the use of double-quotes to enclose a directory name containing a space.) lcd .. (note the two periods) changes to the parent directory of the current directory. If you enter the command lcd . (note the single period), FTP will tell you the name of the current directory on your own computer; this is a very useful trick. |
| binary | Needed for transferring binary files such as .doc and .pdf. Should be used for all types of files, including text files such as html files. |
| send [enter the name of the file in your selected folder that you want to upload to nova] | The named file in your current directory on your home computer is uploaded into the current directory on nova. (The put command is the same.) |
OK, now you've got the idea. If you're lucky, you will never have to touch the command line interface to FTP again.
Finally you have to set permissions on your home directory, your www directory, and the files that you uploaded. To do this, quit FTP and log into nova using PuTTY. Then follow the instructions in the UNIX FAQ under Web Site and FTP Topics: How do I set permissions on a file or folder? under Using the Command Line. Here is what it says there:
2. The modern GUI way
A GUI FTP program is a graphical front-end to the command-line FTP. Typically, it shows you two panes, each of which resembles Windows Explorer. The left pane is for your computer, the right pane is for the remote computer. You can copy and paste files much like you would if you had two copies of Windows Explorer open on your computer. When you want to do something, the program composes an appropriate FTP command, sends it off, receives the response, interprets the response, and tells you what happened in an easily understandable way. (But remember, if you were to look under the covers, you would find the command-line interface.)
Core FTP LE from Core FTP is a free GUI FTP program. Information on the use of Core FTP may be found at http://polaris.umuc.edu/de/ezine/how_to/publish/coreftp/coreftp.htm
If you build and maintain any Web Site, even the most trivial personal one-page site, you need to have some GUI FTP program available.