Darren Provine at Rowan University

Current path: Home / Classes /

(Click here for graphical-browser-friendly navigation menu.)

Homework List for Web Programming

Be sure to review the Program Evaluation Criteria; you will be held responsible for every item listed.

In addition to those criteria, every web page you write, and the output of any CGI program, must pass the HTML & CSS validators available at the World Wide Web Consortium's site (http://validator.w3.org) and include the icons.

Each page, and the output of every CGI, must also work correctly in each of five browsers -- and you must have a browser compatibility list at the bottom (like the one on this page, which you can research), indicating that you have tried it in each of the browsers and reporting how well it worked.

As noted on the syllabus, you may work in pairs on homework unless otherwise noted.

Finally, each page, and the output of every CGI, must include the name of every person who worked on it, with that name a link to that person's Homework 1.

Eight: PHP Grade Data Reporter (due Wednesday, 4 April 2012)

Using the files on Elvis in ~kilroy/source_html/web/GradeSample, write a PHP program which will display a student's grades in a neat format. It should include a mathematical summary of how many points have been earned of the total available for each assignment, as well as for each category and for the term as a whole.

You may only modify assignlist.php; you may not change the DBfuncs.php file.

In the "GradeTables" directory, there's a file on working with MySQL, which shows how to preload a database with information. The file HogwartsGrades.txt in "GradeSample" is an SQL dump with all the information, so you can load it up in your own Elvis database and experiment with it.

Mind security issues: you can't show any student another student's grades.

Once you have one working that does the job right, I'll put it up where you can get to it and then you'll be able to see all your grades for the semester.

Seven: Perl Geometry CGI (due Wednesday, 15 February 2012)

Write a Perl CGI named "geometry.cgi" which generates an HTML form and processes the form to do basic geometry calculations. It has to be able to handle rectangles, triangles, and circles. There should be a radio button (or selection box, either is okay) for whether the user wants the area or the perimeter of the shape. There should be a checkbox for whether the triangle is a right triangle.

Your CGI has to compute the result, if possible, and print out the answer in some sensible way. (Not "30", but "The area of a rectangle 5 x 6 is 30.") If the input is incomplete (you don't get the radius for a circle, or you are missing the width of one of the other shapes, eg), print an error message.

Note that you can't compute the perimeter for a triangle given only the height and width, unless it's a right triangle.

You may find it useful to consult the sample Perl programs we looked over in class. (Or you may not. 8-)

Six: CGI Count to Ten (due 9 February 2012)

Write an HTML form which allows the user to enter a string of characters and a number, and which has a radio button with the choices "blue" and "green", and a checkbox which allows them to turn on bold.

Write a CGI program in any compiled language (shell scripts and Perl and Python and the like are not allowed) which processes the form, printing the string (in bold if that was selected) and then prints out the number and the next 9 numbers. (So if I enter "1", it will count from 1-10.) The numbers should be in the color chosen with the radio button, either or blue or green.

The output of the CGI must be correct HTML, including the webline and the HTML/CSS links.
(HINT: you can install a static CSS file along with the HTML form and the CGI, and then CGI just has to print out a simple "class=" line to get the colors and/or bold correct.)
(HINT 2: Start with a CGI that just prints out the settings, to ensure you're processing the input correctly.)

Your Makefile for this has to compile the program before installing it, obviously. You should include both "clean" and "depend" targets in your Makefile.

You may work in teams on this problem; be sure each person updates their own homework list to point at the result.

Five: SSI foot (due Wednesday, 1 February 2012)

Create a page foot using SSI which contains has some useful information; last updated, current time in NJ. If you're feeling clever do "last updated" as a number of days by getting the time format in seconds and the current time in seconds and then subtracting/dividing. You can throw in a fortune quote or something too if you like. But you have to use SSI to generate at least 2 bits of information in your foot.

Put the current "webline" text in the new foot you've made, and create a "hw5.shtml" which is just a simple HTML page that includes the foot.

Modify homework 1 so it's an SHTML file instead of HTML, and includes the new foot.

Note that renaming "hw1.html" to "hw1.shtml" will break any files that link to "hw1.html", so they'll have to be fixed.

Four: HTML/CSS exercise (due Monday, 30 January 2012)

Using the HTMLreview page (in ~kilroy/source_html/web/HTMLreview) as a starting point, create your own simple HTML summary page. BUT, you can't just stuff everything in "pre" tags. You have to use tables and OL and UL and DL lists to present the information. You should include a little table of contents at the top with jump links to the various categories.

Also, you have to create two stylesheets for your HTML page. The main stylesheet should use CSS make your page attractive and easy to read. The alternate stylesheet should make it an abominable horror, as ugly and awful as possible.

If enough of the ugly ones are really truly ugly enough, we'll vote on which one has the greatest contrast between good and bad and that person (or team of 2) will get extra credit.

Three: "morefiles" lessons in "learn" (due Wednesday, 25 January 2012)

Log on to Elvis, run "learn", and complete all the lessons under the category "morefiles".

If the system says it can't find "learn", you can run it with the full name, which is "/usr/local/bin/learn".

Everybody has to do this one on their own.

Two: "files" lessons in "learn" (due Monday, 23 January 2012)

Log on to Elvis, run "learn", and complete all the lessons under the category "files".

If the system says it can't find "learn", you can run it with the full name, which is "/usr/local/bin/learn".

Everybody has to do this one on their own.

One: List of Homework (due Monday, 23 January 2012)

Create a directory in your Elvis account named "source_html". Create a subdirectory "web", and then one in there named "hw1". Copy the files from the Elvis directory ~kilroy/source_html/web/sample1 in your source_html/web/hw1/ directory. Rename the "sample1.html" file to "hw1.html".

Modify the HTML page so it includes your picture, and has a list of all your homework for the semester. The URL for this page must be of the form:

http://elvis.rowan.edu/~homer/web/hw1/hw1.html
        
Where homer is replaced by your Elvis userid. It should be entirely in lowercase.

Modify the Makefile as appropriate so that when you run "make install", it will install "hw1.html", and the file with your picture, in the right place.

Copy the Makefile from ~kilroy/source_html/web to your own source_html/web directory, and modify it so that it runs "make" in your hw1 subdirectory.

Each person has to do his or her own copy of this homework.

After you get this working, make sure it passes the HTML and CSS validator, and create a full suite of screenshots showing that it works, as in the sample page.


Browsers tested: IE: (dunno) Mozilla: ok, Konqueror: ok, W3M: ok, Lynx: ok.


This page's URI: http://elvis.rowan.edu/~kilroy/class/web/printer.php?homework
Last modified: Wednesday, 21 March 2012, 10:25:41am