COMP519: Web Programming
Autumn 2014

Lectures: Tutorials: Contact:
   3-4pm Monday
      Electrical Engineering 205

   3-4pm Tuesday
      Ashton Building G12
   10-11am Thursday
   10-11am Friday

      George Holt Bldg, Room 113 (Lab 1)


Note: Sometimes a tutorial slot will be used for a lecture.
Dr. Russell Martin
Ashton Building, Room 319
Office hour: Thursday 11-12pm

  E-mail me

Module Description

The World Wide Web is the dominant medium for communication, publication, and commerce in the new millenium. This module will present the fundamental technologies behind the Web, as well as techniques for designing, developing, and evaluating Web-based applications. Topics will include HTML, Cascading Style Sheets, Dynamic HTML and JavaScript, HTML forms and CGI scripting, Perl, PHP and (given time) Java Applets and dynamic web programming using Ajax.

Module Goals

Recomended Texts

These are texts that I have referred to, and will sometimes provide photocopies of small relevant sections in class.
The abbreviations in brackets are used in the table below to denote relevant chapters/sections for that particular subject.

[WS] Web Standards: Programmer's Reference, Steven M. Schafer, Wiley Publishing, 2005.     (If you're going to buy only one book for this course, this is the one that I would recommend.)
[HTML5] HTML5: The Missing Manual, Matthew MacDonald, O'Reilly Media Inc., 2014.
[PJ] Professional Javascript for Web Developers, Nicholas C. Zakas, Wiley Publishing, 2005.
[TYJ] Teach Yourself Javascript in 24 Hours, Michael Moncur, Sams Publishing, 2007.
[J&J] JavaScript & JQuery, Jon Duckett, John Wiley & Sons, Inc., 2014.
[LP] Learning Perl, Randal L. Schwartz, Tom Phoenix, and brian d foy, O'Reilly Media Inc., 2005.
[PPHP] Programming PHP, Rasmus Lerdorf, Kevin Tatroe, and Peter MacIntyre, O'Reilly Media Inc., 2006.
[LPHP] Learning PHP & MySQL, Michele E. Davis and Jon A. Phillips, O'Reilly Media Inc., 2006.
[SQL] Learning SQL, Alan Beautieu, O'Reilly Media Inc., 2005.
[AJAX] Teach Yourself Ajax in 10 Minutes, Phil Ballard, Sams Publishing, 2006.

Assessment

The module will be assessed by formal examination and continuous assessment which contribute 25% and 75%, respectively, to the overall mark. The continuous component will consist of four assignments contributing 75%. In summary, marks will be given as follows:

4 assignments 75 %
(cumulative) final exam 25 %

Tentative schedule of assignment deadlines

Assignment 1: Creating a Home Page 11 October 2013 (5pm)
Assignment 2: JavaScript Programming 7 November 2013 (5pm)
Assignment 3: CGI and Perl 22 November 2013    29 November 2013 (5pm)
Assignment 4: PHP and MySQL Registration Page 13 December 2013 (5pm)

Important: You are required to submit your assignments in two fashions:

  1. You need to have your webpages online, so that I can view them, use them, etc in order to test them properly. This is especially important for the third and fourth assignments as they interact with the computer science server in ways that can't easily be tested just by "looking at the source code" of the pages.
  2. For a proper record of your submissions, you also need to submit the source code via the Coursework Submission System. A direct link to the submission page for this course can be found here. Please ensure that your files are submitted to this system by 5pm on the date the assignment is due. If you have more than one file, you can submit them as a single (compressed, i.e. ZIP) combined file.

Note: Each assignment will be due at 5pm on the date specified. Assignments will not be rescheduled except in extreme circumstances.

Generic marking cutoffs and late submission penalties will apply. (See the Code of Practice on Assessment for details.)
Any student who fails to submit work amounting to more than 30% of the total will be reported to the Chair of the Board of Studies in Computer Science as soon as this situation occurs. The attendance of any sudent will be deemed unsatisfactory if it falls below 75%.

Policy on Collaboration

The University policy on plagiarism and collusion is spelled out in the Student Handbook. Unless otherwise permitted, assignments must be the sole work of the student -- i.e. collaboration on the design or coding of a program is not allowed (unless specifically permitted by the lecturer).

You are, of course, allowed to use the course notes, and examples provided in them, as a basis for your own work for the assessments. The use of other sources should be clearly documented in your source code (use comments, as appropriate to your particular code, to do this).

Remote connection to the UL CS Servers

If you are running a Windows machine, a good program to use to remotely connect to the UL CS server is PuTTY. If you download and install this (free) program, you want to use the following information:

For further details or other options, please see the Department's guide for SSH access.

Editing your webpages

I strongly urge each student to familiarize yourself with the Unix environment, and, in particular, the use of a (non-graphical) text editor such as "vi" or "pico". Using such an editor will help to avoid certain pitfalls later on when we discuss CGI programming. (These problems arise when you transfer a Windows text file to a Unix system which results in embedded charaters in the file that the CGI processor can't handle.) Being familiar with a text editor such as vi or pico also allows you to remotely log into the CS system, using PuTTY for example, and edit your webpages in this fashion.

Don't forget to make your webpages visible to others by changing the file permission. To do so, you can use the Unix "chmod" command. For example typing the command "chmod a+r index.html" will make the file index.html readable by everyone so, provided it's in your public_html directory, everyone should be able to view it in their web browser.

Location of your webpages

If you have your webpages in the proper location (i.e. your public_html directory) and with the file permissions set correctly, you should be able to use a web address of the form
      http://www.csc.liv.ac.uk/~m4xxxxx/
to locate your home page. Note: The "m4xxxxx" should, of course, be replaced by your own user ID. Recall that, without specifying a particular file, a web browser always looks for a file called "index.html" (and others like "index.htm" or "index.php", in some order).

Tentative Schedule

WEEK TOPICS READINGS HANDOUTS ASSIGNMENTS
1 Overview
  history, Internet and Web. (ppt, pdf)
HTML basics
  hypertext, tags & elements, links,
  images, lists, tables. (ppt, pdf)
books:
  [WS, Ch. 1-5]
online readings:
  W3C, ISOC
  W3 Guide to HTML, W3 school,
  XHTML 1.0 Tag Reference,
  HTML5 Reference,
  HTML Goodies
  HTML character escape sequences
  Unix Primer,   A Unix tutorial
  vi (text editor) Primer,
  pico Tutorial
Brief Course Overview
Setting up your HTML directory
Assignment 1 (Creating a Home Page):
    due 11 October 2013 (5pm) (week 3)
2 Style Sheets
  inline, document, external
books:
  [WS, Ch. 12-17]
online readings:
  CSS level 1 specifications (from the W3C)
  CSS level 2 specifications (from the W3C)
  The advanced HTML/CSS references
  HTML color code chart,
  Can Color-Blind Users See Your Site?,
Document Type Declarations
Information on Meta tags
see Assignment 1
3-4 JavaScript basics
  data types, control, functions,
  strings and arrays, classes (ppt, pdf)
JavaScript
  form elements, event-driven programming (ppt, pdf)
books:
  [WS, Ch. 19-23], [PJ, Ch 3-11], [TYJ, Hour 1-14]
online readings:
  Cut-n-Paste Scripts, EarthWeb
  W3 school
A complex JavaScript example Assignment 1 to be turned in (11 October 2013 (5pm))

Assignment 2 (JavaScript Programming):
    due 7 November 2013 (5pm) (week 7)
5-6 Combining Java & JavaScript
  calling Java from JavaScript
  accessing JavaScript & HTML from an applet (ppt, pdf)
  Java applet examples (zipped file) from notes
Internet and Web protocols:
  TCP/IP, HTTP, caching, cookies (ppt, pdf)
Basics of Perl
  basic program, scalars, operations, arrays (ppt, pdf)
  files, controls, conditionals, REs & matchings
  s & tr & split, hashes, subs, references (ppt, pdf)
(perl-files.zip)
books:
  [WS, Ch. 25], [PJ, Ch. 18], [LP, Ch. 1-9]
online readings:
  TCP/IP,   HTTP,
  Beginner's Introduction to Perl,
  Perl.org Directory,
  Comprehensive Perl Archive Network (CPAN),
  Tutorial, Perl Manual,
  Perl Manual, PERLintro,
  Programming Perl, Regular expressions,
  "Quick start" guide on regular expressions
Perl program for random permutations

Perl program for searching files for a matching string

Perl program for the "pancake sorting problem"

Regular expression examples
Assignment 2 to be turned in (Nov 7)

Assignment 3 (CGI and Perl):
    due 29 November 2013 (5pm) (week 9)
7 Perl and CGI Programming
  CGI in server-side programming
  environment variables in Perl
  POST and GET methods
  extra path information
  a basic counter (ppt, pdf) (CGI-files.zip)
books:
  [WS, Ch. 24-25], [LP, Ch. 1-9, 14, 15]
online readings:
  Beginner's Guide to CGI Scripting with Perl
  Rex Swain's HTTP Viewer
  Reading and writing data files in Perl
See Assignment 3
8-9 Introduction to PHP
  basic workings
  variables, operators, and controls
  some useful functions
  working with forms, cookies, files, time and date
  a basic form checker (ppt, pdf, php-files.zip)
books:
  [WS, Ch. 29-31], [PPHP, Ch. 1-6]
  [LPHP, Ch. 3-6]
online readings:
  php.net (general reference site)
  A Simple Tutorial
  PHP Manual
  W3 school
  The PHP Resource Index

Assignment 3 to be turned in (29 November 2013 (5pm)

Assignment 4 (PHP and MySQL Registration Page):
    due 13 December 2013 (5pm) (week 12)
9-10 basic mySQL/PHP
  mySQL database
  a data table
  basic queries
  a basic PHP/mySQL application (ppt, pdf)
advanced mySQL/PHP
  more on SQL queries and PHP/SQL functions (ppt, pdf)
  PHP objects and sessions (ppt, pdf)
books:
  [WS, Ch. 29-31], [PPHP, Ch. 1-8, 11]
  [LPHP, Ch. 8-10, 12-13]
online readings:
  W3 schools
  PHP/mySQL Tutorial
  Top 7 PHP Security Blunders
  PHP Security Guide
  PHP Security Tutorial

See Assignment 4
11 Emerging technologies
  Ajax
  Basic Ajax syntax and examples ppt pdf

  Introductory XML
  (lecture notes provided by Christoph Ambühl) ppt pdf
books:
  [AJAX, Ch. 1-14]
online readings:

Assignment 4 to be turned in (13 December 2013 (5pm))

FINAL EXAM


World Wide Web Consortium (W3C) Markup Validator

Here is a link to the W3C's online validator. This can be used to check if your HTML code conforms to standards. Important! To use this correctly, your HTML document should contain a Document Type Declaration so that the validator can detect the standards that apply to your document.

From the page above, you can also find links to other validators that can be used to check for broken links, correctness of external style sheets, etc.

Student Questionnaires

This module will have a student appraisal in the from of questionnaires at the end of the term. We strongly encourage you to complete it.

Validate HTML
Validate CSS