\n"); } else { header("Content-type: text/html; charset=utf-8"); } ?> CS-081 Assignment 2

CS-081 Assignment 2

Background Material

The purpose of this assignment is for you to become familiar with the laboratory environment you will be working with this semester.

Lab Activities.

  1. Log into your account and verify that the roaming profile is working correctly.

    Use the information in the TREE Lab Information web page to log into your account. Change your password to something secure. (Type Ctrl-Alt-Delete and click on “Change Password.”)

    Download the zip file containing template.xhtml to your desktop. Log out, and log into a different computer in the lab. Be sure template.zip is on your desktop on that computer too.

    If you are not able to complete this step successfully, stop. Contact me to let me know what went wrong, and I will try to fix the problem. But do not continue to the next step until this step works correctly.

    Extract the contents of template.zip to your My Website directory.

  2. Set up your course website using Dreamweaver

    The Dreamweaver Setup web page tells you haw to set up a Dreamweaver site. Create one using your My Website directory as the local root and C:\htdocs as the remote site, as demonstrated in class. Use Dreamweaver to edit the template.xhtml that you extracted in the previous step. Remove all the comment lines from the template file, and save it, and close it.

    Duplicate template.xhtml (click on the file, then either type Ctrl-D or right-click, and select Edit→Duplicate), then rename the duplicate file from Copy of template.xhtml to index.xhtml. Now open index.xhtml (double-click on it) and make the following changes:

    • Change the page title to something meaningful rather than “CS-081 Course Template”
    • Change the contents of the h1 element to something meaningful that includes your own name.

      If you want to put an apostrophe in your new title (such as something like “Vickery’s Web Site,” do not type a prime symbol ('), which is what you get if you type the “apostrophe” key on the keyboard. Instead, type ’. This will give you a “right single quote” symbol to use as your apostrophe. This topic will be covered in more depth later in the course.

  3. Verify that your site is set up correctly.

    Save your index file, and use Firefox to visit your web site using a “~ type” URL: http://sometree.cs.qc.cuny.edu/~youraccount. Substitute the name of the computer you are logged into for sometree and your account name for youraccount. Check Firefox’s title bar to be sure your page’s title shows up; look at the page to be sure the h1 is displayed correctly. Check the HTML validator on the lower right corner of the Firefox window to be sure it is a green circle with a checkmark in it and not a red circle with an X or a yellow triangle with an exclamation point. Click on the XHTML link at the bottom of the page and verify that the page is valid XHTML 1.1 with no errors or warnings. If your site fails any of these checks, fix it and try again.

    Use Dreamweaver to copy your index page to the “remote” location for your site. For this course, the remote site is actually the C:\htdocs directory on the computer you are using. With the index page selected, you can type Ctrl-Shift-U to do this. The Dreamweaver Setup web page gives some alternatives. Now visit the “home page” of the computer you are logged into using the URL: http://sometree.cs.qc.cuny.edu/. Your index page should show up again and still pass all the validity checks listed above.

That’s it: do not add any more pages to your site yet, and do not try to do anything to the appearance of your index page yet.

Submit The Assignment

Once you have set up your web site and tested that the index page validates, log out of your account so your site will be copied to the server. I will copy your site from the server to the computer in my office (babbage) to check it out.

When you finish your assignment, send me an email message telling me that it is ready. Use CS-081 Assignment 2 as the subject line. Make it look just like that to avoid my spam filters. Send the email to: vickeryatbabbage.cs.qc.cuny.edu.